I think the discussion got a bit muddied by people pulling out examples from various editions of D&D. The thread, ostensibly, was about 5e. 5e, AFAIK, doesn't have any rules that mandate anything about classes in the vein of AD&D or OD&D/Basic/whatever. There's no training rule that I'm aware of, nor any 'fight the great druid' type rules in that game. So if we restrict ourselves to the original topic, then class appears clearly to be a meta-game construct.
If you stick to AD&D (and some parts of OD&D/BECMI IIRC) then there are mechanics which clearly reference class, though its still not at all clear that class is intended to be a narrative in-world concept. IMHO it just wasn't a concern to Gygax, he wrote down what he did and that was what was 'rules', but we really don't know how it was presented in-game. You'd have to go over to RPG.net and invoke Old Geezer or someone like that who's still around and played with him in the days of yore. IMHO AD&D wasn't intended to be taken as strictures at all, its intended to provide ways to do things. PLAYERS might be 'breaking the rules' in some sense if they pass over those strictures, but EVERY SINGLE PLACE WHERE THEY EXIST in AD&D is related to the DM and NPCs, aside perhaps from who can use what magic items, which is a pretty weak peg to hang the whole thing on.
I won't even venture an opinion on 3.x d20-era D&D. I've played, but I don't own the books and the way MCing etc work it looks to me like 'class' is just a convenience to organize what is effectively a point-buy character system (though you can certainly play it straight up without MCing much and then it mirrors 2e fairly well). I suspect there are a few 'class mechanic' rules, but they're similar to 2e's and not as prevalent.
4e simply flat out disposes of class as any sort of in-world concept AT ALL. NPCs are universally represented as stat blocks and there are an array of tools provided outright to facilitate modelling any sort of NPC character concept. WotC NEVER ONCE presented in any material an NPC with class levels. There's a sort of rump of the concept at the back of the DMG, but they never even bothered to extend it to cover classes post-PHB1. Clearly if we were to have this discussion about 4e it would have ended on page 1 of the thread.
5e IMHO carries on where 4e left off. It does leverage class to a slightly greater extent, by for instance using spells in monster stat blocks. It doesn't however appear to contemplate that NPCs will generally be characters with class and level, though it seems to be more agnostic than 4e about whether the DM might use that technique. I don't personally know of any place in 5e where the rules clearly present a mechanic that would, even very strictly speaking, require an NPC with class levels, or that NPCs of some ilk in general are classed.
The precedent of past editions of the game is important, and it is important for both sides of the argument, albeit for different reasons. It is important for the "class is real" side because we are able to show a long-term continuity of class being recognized as as real, and argue on this basis that the current edition builds on this precedent (and not just that of a single edition). It's important for the "class is metagame only" side because they can say they are comfortable with the precedent as understood by most players, but can play around with builds simply because following the text of the rules too closely is too confining and gets boring.
So here is how class is defined in the various editions of the game (excepting B/X and its various permutations.
OD&D said:
There are three main classes of characters: Fighting-Men, Magic-Users, and Clerics (Single-Volume edition of box set, p. 8)
OK, no definition given here or anywhere else. Inconclusive - could be interpreted either way. Moving on.
AD&D said:
Character class refers to the profession of the player character (p.18)
. That's pretty unequivocal. I don't know how many times it has been claimed in this thread that class is not a profession, but here it is, in black and white. It doesn't literally say "and the character is aware of belonging to this profession", but obviously, that is (putting it mildly) a much more warranted inference than "but that doesn't mean the character is aware of it." Onward:
2e said:
A character class is like a profession or career. It is what your character has worked and trained at during his younger years. If you wanted to become a doctor, you could not walk out the door and
begin work immediately. First you would have to get some training. The same is true of character classes in the AD&D game (internet pdf version, pp. 51-52).
So, here is an explicit comparison between D&D and real world professions, which people who belong to them are very much aware of, and in which, during the course of training, they obviously interact with others who belong to it as well, and recognize them as such.
3e said:
Your character’s class is his or her profession or vocation. It determines what he or she is able to do: combat training, magical ability, skills, and more. Class is probably the first choice you make about your character (p. 21 in both cases)
Continuing in the profession vein, and underlining the centrality of class to the character.
And now - att'n!
4e said:
Your class is the primary definition of what your character can do in the extraordinary magical landscape of the DUNGEONS & DRAGONS world. A class is more than a profession; it is your character’s calling (p.50).
The first sentence is certainly possible to interpret as referring to powers and not to identity - but only if you ignore the second sentence, which says that class is not any old profession, but a calling, the overwhelming driving force in the character's life. A calling is by definition something you hear (physically, or at least spiritually), thus, something that registers, something you are aware of.
5e I've already quoted earlier on, and it essentially says the same thing:
5e said:
Class is the primary definition of what your character can do. It is more than a profession; it is your character’s calling. Class shapes the way you think about the world and your relationship with other people in powers in the multiverse (p.45).
It has real effects in the world, and shapes peoples thinking and outlook. There is no suggestion that it does so unconsciously.
So there is a very long thread in the game that conceptualizes class as a real category in the game world. It didn't have to be that way, and it could easily have developed the notion that class is just a bundle of mechanics. Something along these lines:
Your character’s class is the most important factor in determining what your character can do. Your class determines what armor and weapons you start off knowing how to use, what skills you can learn, how many hit points you have, and— most important—the class features and powers you wield. These, in turn, determine what role you’re best suited for in combat encounters as well as in some noncombat encounters.
This is from the 4e PHB 2 (p. 30). Now, this characterization is clearly much more in tune with what you are arguing - it's about the crunch, and its impact on combat. There is no suggestion here of class as a profession or any sort of social category that a character can identify with.
And that's the problem, from my perspective. If the long-running precedent had been build around this notion of class, class would indeed have no in-game concept. And then, it seems clear that people would either demand to have rules which allow them to design their own congeries of mechanics (called classes), increasingly more classes (which 4e did in fact deliver in numerous PHBs), or, they would begin to lose interest in a game that increasingly diverged from the class-centered game of earlier editions. Which is in fact what happened - people went elsewhere, but many of them came back once the new edition appeared (though obviously, there were numerous other reasons for the defection and return as well).
For my part, I don't know if I would stick with a game like 4e (I was kind of on gaming hiatus during those years), precisely because the class-centeredness was exchanged for something that is quite a bit closer to a skill-based system, and, without putting words in people's mouths, I have the distinct sense that a lot of people who like 5e better than 4e think a long the same lines. But if you want to see class in a more 4e framework, that's fine. I agree with those who say that's similar to houseruling alignment out of bounds (something I've done before, and still do de facto).