It may have not been D&D where the adage originated, although I know 5E specifically states that it's okay for a character to die, and you're winning as long as you have fun and tell a cool story.
Oh, I think it has LONG been true that D&D has advocated a 'cooperative fun' approach. I think that approach was even in existence in the early days (though Dave Arneson's original Blackmoor campaign was largely a battle between good and evil PCs!). I just think there was EVEN SO a notion of 'doing well' or 'doing badly' that was held to reflect on the skill of the player. Having a 15th level PC in early Greyhawk might not have been literally 'winning', but it DEFINITELY came with bragging rights! For that reason, and that the players were rivals as much as allies, made the neutrality of the DM very important, much more so than it would be in say a 4e game today, where the players are expected to be a team.
I think there deserves to be more distinction between who can gain levels and who does gain levels, and D&D hasn't always been very clear on the topic. Certainly, most NPCs in AD&D didn't gain levels, but they also weren't in a position to gain levels. What about henchpersons and hirelings? Did they not gain levels? Or were they also assumed to be as special as PCs?
I don't know about 3e or 5e, in AD&D and other versions of 'classic' D&D henchmen were able to gain XP (albeit sometimes at a much reduced rate). Henchmen were considered to be a pretty rare commodity in 1e. I don't think 2e ever had explicit rules for recruiting them though. Hirelings are less clear, they are likely to be ordinary persons, but COULD possess classes or levels.
4e really is fairly agnostic about this topic. Companion Characters can earn a share of XP and advance in level, but they don't have classes. There IS a rule in DMG1 for creating leveled NPCs with classes, though the mechanics are still considerably different from PCs and there's no specific statement about XP anywhere. Nothing is ever stated about monster advancement.
In 3E, everyone had a class and a level. The difference was that PCs probably had better stats, and took their levels in better classes. The exercise was left to the reader as to how an NPC reaches level 9 as a Commoner.
Yeah, 3e.... honestly a game which I was never at all impressed with. No other version of D&D of course ever had exactly this conceit.
In 4E, only PCs had the traditional class and level (in most cases), but NPCs could reach high levels of competence as enemy (or allied?) monsters. The exercise was left to the reader as to how an NPC becomes a level 9 Soldier. If you take the view that monster stats or PC-stats are just a matter of perspective, such that you could reflect the same individual either way as the circumstances warrant, then there's clearly nothing special about casting spells or being really good with a sword.
Its still just as special as the rarity of these abilities is. While nowhere is it ever stated how many figures of various levels exist in a 4e world we do get some ideas just from how they are portrayed. Up to level 10 characters are 'heroes', they are probably not unique, but are certainly 'special'. From level 11 they become arguably unique, as a level 11 PC is a 'Paragon', which carries the connotation of "the best of his kind." So its arguable that a level 11 fighter is intended to be the greatest living fighter in the world. Likewise a level 21 fighter is 'Epic', and given that the main characters in epics are unique in history we would then assume that AT BEST there have ever been only a few comparably powerful individuals ever in recorded history.
Going by 4e published materials, in mundane places on the edge of civilization like Fallcrest you can frequently find figures of levels 1-5. You might potentially meet figures of up to level 10 in some unusual situations. Paragon level characters are rare, but a few exist up to around level 15, beyond that there's very little but 'monsters' and a few unique individuals.
So, I would say that in 4e being 5th level is pretty good, you're not likely to have a ton of competition around you all the time, unless you hang with some VERY tough crowds. If you're level 10, you're the baddest-assed mofo pretty much anyone has seen in these here parts since way back. Just being level 1 makes you at least 1 in 1000, assuming that say all the higher figures in Fallcrest are detailed, which is a fair assumption.
In 5E, only PCs must have a class and level, and NPCs are allowed to use a monster stat block if the DM feels like it. The way it's set up, NPC stat blocks are designed to reflect class abilities. The question of whether to model someone as a monster or with a full PC-grade write-up is just a question of expedience, but there's nothing inherently special about possessing the abilities of a level 9 Fighter or Wizard.
That being the case, from a certain perspective, PCs have gotten less and less special with each edition.
Eh, I don't think so. In classic D&D there was always a definite notion of 'higher hit-dice individuals'. Every humanoid race has them for instance, and you can easily run into higher hit dice humans, though they're not quite described in the same language as PCs in all sources. I would say that PCs are and have always been something of a rare breed. Not unique, but pretty special. What is ALWAYS said to be special about them, and has been repeated in every PHB since the dawn of D&D, is that the PCs have a special place in the world. They might not be uniquely powerful, but they ARE uniquely selected by fate.