I think that to codify the D&D "default" world the biggest question you need to answer is what level everyone is. When D&D actually prints mechanics for generating NPC levels the results are schizophrenic and insane and posit worlds where 26th level wizards live in forts built by 16th level experts who beseech 5th level Paladins to help the sick townsfolk who shouldn't exist cause there's a dozen clerics in town that could cure them all instantly.
But just because the stock answers are wrong doesn't mean that answers couldn't be given that would give a functional representation of the society D&D pretends would exist. Here is the societal level breakdown that I think would make the D&D worlds the D&D stories try to tell.
We'll split society into four groups of ascending level: Civilians, Adventurers, Legends, Phenomenons. Here's what each should be and how many of each there should be...
Civilians: (3 levels in an NPC class) Every sentient being in D&D should have 3 levels in an NPC class. Not more, not less. 3. Every Peasant in the world should be a 3rd level commoner, every guard a 3rd level warrior, and every blacksmith a 3rd level expert. Between feats, ability scores, and skills there is already plenty of room to differentiate the masses without any need at all for 19th level commoners to even be an option. PC's should also get the bonus hp, skills, spells, and bab bonuses they retain from their origins as 3rd level experts, aristocrats, warriors or adepts. This gives the D&D world a little bit of room at the bottom and gives us a populace that is afraid of wolves but can beat housecats in a 1 on 1.
Adventurers: (1-6 levels in a PC class) Anyone with even a single level in a PC class goes here. They are literally the 1%. Someone with even a single level in a PC class is a badass and has cleared his head and shoulders above the masses by some noteworthy amount. Adventurers are level 1 through 6 and possess amazing capabilities to the public at large. A 3rd level Wizard can shoot fire from his hands, change his form, and speak on the wind. A 3rd level Barbarian can kill 4 trained men in a straight duel and may be the strongest man those men had ever seen. Adventurers higher than 6th level are rare enough that the world can be considered to operate on E6 principles
Legends: (7-10 levels in a PC class) One in a hundred people will get even a single PC class level. One in a thousand of those will hit 7th level. The people above that point are the movers and shakers in the world. They can do the impossible and are seen by the populace with awe and fear. The rarity of individuals of this power level tells us why high magic hasn't revolutionized the world. Teleport hasn't overhauled trade because their are only 4 people who can Teleport and they're busy running their empires and fighting each other. It also explains why the PC's are tasked with saving the world instead of a bunch of high level wizards doing it. Namely that the high level wizard is the one that put you on the job anyway because he can only do so many things a day and spending two weeks saving the world means he might as well give his empire away.
Phenomenons: (11+ Levels in a PC class) The game only works for a couple more levels here. When all sides of a conflict can summon unlimited angels it becomes uninteresting, so playing past level 13 isn't advised. Still those last few levels are big deals. There are no default characters at this power level. Phenomenons are campaign dependent and they each define the campaign. Most Phenomenons are in the past, they're ancient history. Any that rise up from the populace today will necessarily change the face of global politics. If a baddie finds a way to hit 13th level then he's the BBEG, a threat to the entire world. If a great hero rises from the ancient past as a 13th level Cleric then he's the only chance the Gryphon Empire has to reclaim its former glory.
The percentages of each category are approximately
Civilians: 99%
Adventurers: 1%
(Breakdown by level: 1st level 50%, 2nd level 33%, 3rd level 10% 4th level 4%, 5th level 2%, 6th level 1%)
Legends: .00001%
(Breakdown by level: 7th level 40%, 8th level 30%, 9th level 20%, 10th level 10%)
Phenomenons: ?
Which means that for a campaign world with a population of 5 Million, a number equal to all of Europe at its worst times and probably twice the population of the LoTR's world, you would get the following breakdown:
Total Population: 5,000,000
Civilians: 4,950,000
Adventurers: 50,000
Legends: 50
Those 50,000 Adventurers By Level-
2nd: 16,500
3rd: 5,000
4th: 2000
5th: 1000
6th: 500
8th: 15
9th: 10
10th: 5