This is very ambiguous.
Your second version is more probably correct. We can interpret the sentence as saying that the former other ranks are dreaming of avenging three things: old insults, injustices, and nuances of upper-class disdain.
The difficulty of parsing this sentence is due to the third indirect object—"nuances of upper-class disdain"—having been left dangling, without the conjunction "and" to bind it with the other two indirect objects.
The use of "and" would have made the sentence's meaning more clear:
Thirty-odd years after demobilization, there are many former other ranks who enjoy a dream of avenging old insults, injustices, and nuances of upper-class disdain.
It is also possible that your first version is correct, but that is putting a greater strain on the construction of the sentence. If the intended meaning is closer to your first version, then some simple punctuation would have made the meaning clear:
Thirty-odd years after demobilization, there are many former other ranks who enjoy a dream of avenging old insults, injustices—nuances of upper-class disdain.