NPCs have different ways of gaining experience. Ad-hoc "Life Experience" counts for something.

My preferred way of explaining a high-level NPC Expert is that they've survived several encounters with adventurers. For example, an Innkeeper that houses any adventurers gains XP if his inn doesn't burn down by the end of the night. An expert craftsman would be one who's produced many fine-quality weapons; XP might be gained for this.

Higher-level Warriors also make some amount of sense. The local guard might not have trained with swordmasters, but he's been guarding the gates from goblin hordes for ten years.

Higher-level Commoners don't make all that much sense. Even if somebody is really good at growing turnips, then he'd probably be an Expert focused on Craft (turnip growing). That 20th-level Commoner tax collector in Faerun (I think) would be an Expert in my book.

To me, higher-level Aristocrats make the most sense of all of the NPC classes. Aristocrats have many chances to have challenges - successfully engage in politics, raise taxes without causing a riot, start a successful business venture, get that Keep you've always wanted. A really successful Aristocrat is very worldly and experienced, but doesn't really do much adventuring on his own.

Adepts are tricky. I'd be tempted to give them PC levels in Sorcerer or Favored Soul after about 5th. But it's possible that they're naturally talented, just not so much as an actual Sorcerer or Favored Soul. A high-level Adept might be that old fortune-teller that never had magical training, but really does have some ability to use magic. XP might be gained by avoiding witch hunts, successfully influencing weather or crop growth, bestowing or removing a curse, finding wells, successful matchmaking, warding the town from evil spirits, or fooling the rest of the town into thinking you've done any of the above. Bonus XP for each cat they're able to house.