That's really the feeling I've been getting. If the NPCs get to play by the PCs rules, then we'll end up with a high-magic society in short order (by "short order" I mean a couple generations).
If the NPC's are only playing by the PC rules, my expectation would be for society to collapse completely. As practical matter, the PC rules suggest that the only way to level up is to kill things in situations where doing so involves real risk of mortal loss and serious injury. That is to say, if we assume the rules for PC's apply to everything and everyone, the implication is that no one can actually learn anything beyond the most basic level of skill and knowledge without killing something and risking being killed.
That is to say, you couldn't gain more than rudimentary knowledge of blacksmithing, carpentry, law, psychology, diplomacy, and so forth without someone in some community dying. The result would be spiraling disasters of warfare where everyone died at an early age and the population of everything crashed uncontrollably. Or if the society evolved to pacifism to protect itself, then it would be left bereft of advanced knowledge (much less the ability to protect itself) and would get destroyed by something else. As Dandu put it, if murder equals improvement in calculus, then the implication is that there isn't much use a university, and the only knowledgeable people in the world are pit fighters, gladiators, and gang leaders.
So I think it is very clear that the demographics of the NPCs doesn't mimic the demographics of the PC's, and the path that they are using for advancement in the world (practicing a trade, going to school, studying lore in a library, etc.) is not the one the PC's are using but is if not as time efficient, one that is safer and more productive in the long run. Yes, the D&D world does appear to work on the principle, "What doesn't kill you makes you stronger.", but it also appears that most NPCs are being successful in life without doing what the PC's do.
I also note that in my current 6 year long campaign, there have been 11 PC's that permanently died out of six players. Only one character has survived since 1st level, and is now 10th level. Even that character recently died but was raised from the dead. NPC's with less advantages than PC's would die at an even higher rate. It's not clear to me how many characters could actually reach high level in my game using the PC rules, as if I had made everyone start over at 1st level the game not only could not have gone on, but it's doubtful there would be any or many high level spellcasters at all. And certainly in my game world, high level NPC's are rare. At about the mid point of the game, the PC's killed an 8th level Wizard (the apprentice of the BBEG). At that point, that wizard was the second highest level spellcaster in an entire nation of some 400,000 people. He was pursuing the 'PC path' of leveling up by adventuring. The highest level spellcaster in the nation was an octogenarian 10th level Wizard who had pursued a largely scholarly path, and who would presumably soon be dead.
It is equally interesting what systems wouldn't develop if every two-big cleric/druid/whatever could "create water". Would plumbing even be a thing?
I very much concur that the big effects of magic are the economic ones that D&D has historically underpriced because the level and effects of spells were typically balanced according to gamist concerns, where the default game assumption was going down into a lair, kicking the doors down, and taking their stuff.
For world building purposes, that's not good enough, and so problems like 'Create Food & Water' or 'Fabricate' do have to be dealt with if you don't want massive implications for the game world. Still, just as 'Create Food & Water' generally only allow the PC cleric to support himself and the party (both fellow PC's and their steeds and henchmen), it's quite likely that such spells only normally support the cleric and his staff and that moreover reliance on them makes the cleric less able to perform his other duties. Your bigger worry are actual items like everflowing jugs and lyres of building. Such items need to be either prohibited or else made much rarer and more expensive.
Would larger societies be more environmentally sustainable?
Oh no, quite the opposite. Unrestricted magic would almost certainly destroy the environment and the world in rather short order. Sustainability is based on a balance of intakes and outtakes. The net change on the overall system should be zero. As best as we can tell on the small scale descriptions that we have, D&D magic does not provide for sustainability. Magic can permanently add new features to the system, or permanently remove the. Mass and energy can be actually destroyed, or introduced or banished from the system. You can conjure new things into being or send them to other universes. You can actually disintegrate things or polymorph them into things with less or higher mass and a wholly different chemical composition. If this ability isn't vanishingly rare, or there isn't some undisclosed balancing feature to this, in the long run - say a few thousand years - the world is doomed.
One of the assumptions of my game world is that those undisclosed balancing features do exist, and among them is that magic is vastly more dangerous than it is presented in the D&D books. Spells do work like that on the small scale, but magic applied on a wider scale (either in time or space) has second order effects that only become noticeable over time because they are subtle. The analogy I use is that all magic is radioactive, but small amounts of radiation (the dose you get flying in an airplane, eating a banana, living in a brick house, etc.) aren't generally noticeable. It's only when you begin to concentrate the effects that weirdness starts happening. Adventurers wandering from place to place might notice the effects of magical pollution, but because they are generally engaged only in instantaneous effects and wandering from place to place they don't generally notice the consequences of their own spell-casting. If on the other hand, you tried to build an entire city with 'Wall of Stone' spells, not only would someone show up to tell you how bad an idea this was, but the consequences would likely be terrible if you persisted.
Besides which, spells exist in my homebrew setting that undo the effects of creation magic like 'Wall of Stone', so an enemy could just dispel your walls as quickly as you raised them.
I mean I think one of the biggest appeals of the Drow/Underdark setting for me is that they're a society that specifically breeds for powerful magic users.
I feel I should disclose that I find the Drow poorly conceived, and that as I imagine them they are very different than the Gygaxian conception (and even more different from the Salvatore conception). For Gygax, the drow existed for gamist reasons (high level characters needed a suitable foe more powerful than orcs).
Exactly what assumptions you make about magic and D&D society will lead you to very different settings. The setting I prefer and use assumes the ubiquity of low level magic (because the hurdles of obtaining enough skill to cast a cantrip or a 1st level spell seem fairly small), but assumes the rarity and scarcity of high world changing level magic (because the hurdles of reaching 12th level are huge). If you make different assumptions, then you get different results (at least, if you care to explore the implications of yours choices). Those results aren't wrong, but they do end up resulting in a world very different than anything that is familiar or historical. Taken to an extreme, you'll end up with a society without plumbing, roads, and all sorts of things we consider normal just because the technology in use is so different than our own. Good luck imagining all of that.