The trouble with all this is that what you know is not what they are, but what they do; their field of expertise as we choose to define 'field'. Are physicists, chemists and biologists different paths of their 'class', chosen at 3rd level? Are they different classes? Are they all commoners with different skill and feat choices? We cannot know, and in a game which included rules to create scientists those guys could not know their own class in rules terms, even though they could and would divide themselves into factions in game which may or may not match the game rules governing them.
All of those things you have suggested are possible ways a game
could choose to do it. That there are multiple possibilities does not mean that you can say that
absolutely every world can't do it.
But their D&D class is unknowable. They can certainly describe themselves in similar ways (fighter, wizard) and the names of the classes are supposed to resemble the role they play, but anyone in game describing themselves as a fighter may or may not have fighter class levels.
You seem to be arguing two different things here. On the one hand, your first sentence suggests you are arguing that class is unknowable,
even in principle, to characters--it is never, ever something they could be aware of under any circumstances. But the other sentences, and some of your other stuff (like the "I may be over-emphasizing" bit), seem to indicate that you are merely arguing that it isn't knowable in
some universes. These two are fundamentally distinct things, yet you appear to be fluidly moving between them as though support for one indicates support for the other. That's not a thing you can do, because they're logically different claims. The first is "class-awareness is
never possible," while the second is "class-awareness is
not guaranteed." I fully agree with the second claim, but completely disagree with the first.
What exam could the creatures in game give the 12 classes to prove that they must have levels in that class? How would you test, say, a paladin? Earlier in this thread it was asserted that a pit fiend would absolutely know that the party contained a paladin if most of the party made their saves, because paladins have an aura that adds to saves. What? It couldn't be that they have Rings of Protection? Or simply rolled well? The pit fiend could not know about the aura; he's much more likely to blame bad luck than blame a game rule he could not possibly know about. "I knew I should've worm my lucky pants today!"
What if I told you that,
in my campaign world,* every Paladin has a particular
feel to their spiritual aura, the "scent" their essence exudes? What if I told you
every class had such a particular "scent," and having training in different classes merely blended their scents together? A normal human might be inured to such scents--hell, all mortals might be unable to sense such things. But angels and infernals, oh, they're quite different. Their fundamental
nature is spiritual. Just as a Paladin's blessed blade "knows" (in the sense that, on average, it deals more damage to) whether a being is a fiend or undead as opposed to a natural creature, fiends and angels can "know" the natures of the beings they meet. The feral, red-and-green must of Druidry; the salted-steel of Fighters; the flavored-cream subtleties of Cleric; etc.
There's nothing logically preventing this from occurring. The choices you make mark your soul--in the same way that a spiritual being might be able to simply
know if a person has raped or killed or stolen, purely from the spiritual-sense data they can detect.
So that would be the "exam" you'd ask for. Summon an angel, or a devil, or...I dunno, some being of perfect law or whatever. Whether by persuasion or contract, have it examine and share the information it can see imprinted on the subject's soul. Another possible exam could be that, in a certain world, training in a certain class causes a physical brand on the person's body--because Heroes (people with class levels and HD) tap into the powers of Fate, empowering them in ways mortals cannot be, and that power leaves marks--sometimes many marks, for those who tempt Fate by dipping into its coffers a second, or third, or fourth, or more-th

P) time.
*I don't actually have a campaign world. But this is a cool setting conceit, so I might actually use it if I ever
did make a campaign world.
As interesting as your personal example is, it doesn't prove that the rules mandate that creatures are aware of their D&D class. What you've done is carefully create a world in which they somehow do, and then hold that up as evidence. But it is only evidence of what you have done, not what the PHB made you do!
And here you are again with the arguing that I have to prove it's universal. You have, repeatedly, claimed that it is
universally IMPOSSIBLE for a character to know their class. That claim IS invalidated by my example: to prove that something is
not impossible, I only need to prove that it has happened at least once. That leaves you only with the much weaker claim, that it is not
guaranteed--a claim I have already long granted you.
Would it be fair to create a setting where a group of PCs were the ONLY Fighter, Rogue, Cleric, and Wizard in the whole world? Why or why not?
Yes, because that's a potentially interesting story. DW even recommends it, after a fashion, and I'd call it a pretty fair game.