It's considered a compound noun, meaning two words combined to create a single idea. Compound nouns are generally not hyphenated unless they are:
* Unusual combinations: Like "mother-in-law" or "jack-in-the-box."
* Used for clarity: For example, "re-create" to distinguish from "recreate."
* When the second word modifies the first: Like "high-pitched" or "well-known."
Since "middle class" is a standard, well-understood term, it doesn't need a hyphen.