I've always wondered about this from the opposite end: why isn't it more common in these settings for the average person to have access to these low-level spells that have niche use for an adventuring party but would be extremely useful for a farmer or peasant?
Sure, becoming a wizard requires both literacy and money, but Create or Destroy Water and Purify Food and Drink are accessible by level 1 clerics and druids. The village temple for the local favored god or the nearby druid circle could easily train the average person to have enough faith or harmony with nature to hit level 1. Most people probably never move beyond that because of the time and commitment required, but that first level isn't all that inaccessible.
Extrapolate that into positions that require more learning. Why aren't judges all low-level paladins or clerics for that Zone of Truth, or wizard for Detect Thoughts?
Which means, to me, the thread's question becomes a bit of a moot point. Sure, the majority of the ruling class is probably magic users. So is the majority of the lower class. The difference is once again the same as it always is: a matter of who has access to the most resources to actually maximize that power. The average peasant will simply never have the time or gold to become a level 20 wizard. But maybe the farmer's daughter down the way studied really hard to learn Plant Growth to make sure the local harvests always succeed.