According to The Grammar Bible by Michael Strumpf (page 29), in a section on "Possessive Case":
Sometimes possession is shared by several nouns. In these cases, just make the last word in the series possessive.
America and Canada's timber resources are dwindling
Thomas and French's discovery shocked the world.
Leslie and Eric's lasagna is to die for.
These sentences all contain nouns that show joint ownership. In the first sentence, the resources belong to America and Canada. In the second sentence, the discovery belongs to both Thomas and French. In the third sentence, the lasagna belongs to both Eric and Leslie.
To show individual ownership, apply the possessive sign to each item in the series.
America's and Canada's timber resources are dwindling
Thomas's and French's discoveries shocked the world. [Note: I personally would have used Thomas' instead of Thomas's.]
Leslie's and Eric's lasagnas are to die for.
In these examples, each noun has individual ownership of resources, of a discovery, or of a lasagna. These things are not shared.
In your example, if you followed the above advice, you would write either: The writers and teachers' wages were stagnant. Or The writers' and teachers' wages were stagnant. It depends on if you consider the ownership of wages joint or individual. I would actually recommend rewording this anyway: The wages of the writers and teachers were stagnant.