RAW, xp is gained by killing monsters, so everyone who isn't an adventurer would be permanently stuck at 1st level.
And, in 1e RAW, by gaining treasure and by playing to one's alignment.
But it's not really about xp and levels, it's about skillsets. A 10th level farmer or librarian or bank manager or sheepdog isn't going to have the same skills as a 10th level adventurer.
A 10th level librarian or farmer or bank manger isn't going to exist as none of those are classes in which one can earn xp.
Adventuring classes ONLY DESCRIBE ADVENTURERS. They are not meant to describe the general population.
Here we disagree; I see the classes as describing anyone who would reasonably fit into one. Any soldier, for example, is automatically on its way to being a Fighter if not already there. Any urchin or street thief is either already a Thief or well on its way to becoming one. Any acolyte in a temple has the potential to become a Cleric given enough time and devotion but need never leave the temple in order to do so.
Most notably, RAW all medium creatures use a d8 hit dice. This is reflected in the "sidekicks" rules in the Essentials Kit (which actually work well if you want to give non-adventurers levels).
For anything in a class I'd toss this and replace with the hit dice appropriate to that class - which may still be a d8. But soldiers becoming Fighters would use a d10, a street urchin becoming a thief would use d6, and so forth.
Note that this does raise a big headache in one regard: how to distinguish the hit points one has as a non-adventuring commoner (because everything has hit points) and the hit points earned as a member of a class; as they're not additive and having one replace the other is kinda messy.
We found that adding in a system of "body points" solved this rather elegantly (though some complications arose elsewhere, but nothing too onerous): everyone has a certain number of body points (not many, usually 2-5 for a Human) and for most common folk that's all the h.p. they ever get. "Fatigue points" are those you earn through your class; sometimes commoners have 1 or 2 of these but no more. Your b.p. are locked in for life* once rolled, while your f.p. change with your class level.
* - barring corner cases e.g. loss of a limb, which can permanently affect your b.p. total
As a pleasant side effect this b.p.-f.p. system also solves a lot of the h.p.-are-meat vs h.p.-are-luck arguments: b.p. are pretty much all meat, f.p. are mostly not meat but can still represent nicks, cuts, bruises etc.