The term "middle class" has had several, sometimes contradictory, meanings. It was once defined by exception as an intermediate social class between the nobility and the peasantry of Europe. While the nobility owned the countryside, and the peasantry worked the countryside, a new bourgeoisie (literally "town-dwellers") arose around mercantile functions in the city. In France, the middle classes helped drive the French Revolution. Another definition equated the middle class to the original meaning of capitalist: someone with so much capital that they could rival nobles. In fact, to be a capital-owning millionaire was the essential criterion of the middle class in the industrial revolution.
The setting is Medieval, vaguely European. The setting has several kingdoms. The kingdoms aren't (resource wise, politically, geographically, and economically) positioned to thrive on trade. Further the industrial revolution, in any material form, hasn't touched these kingdoms yet.
Nevertheless I'd like to justify a prosperous middle class. I'm willing to be flexible (in either way) on terms of hygiene, exact mechanics of nobility/royalty, education, and religion, but I do not want the justification grounded in a specific religion/religious philosophy, or a culture so radically unique to abandon "medieval, vaguely European" from the ten-thousand foot view.
How can I justify this prosperous middle class?