a lot of people have said there is no way an NPC could tell anything about a characters class by observing them. This is patently untrue, because the class is tied to specific abilities that have specific effects. A Wizard can only cast Fireball a certain number of times before running out of fireballs to cast. An evoker can create pockets of safety in that fireball, and whether they do it by sucking some of the flames into their mouth and rage screaming to the heavens or they do it by dancing to harp music they both are doing the same thing with the same concrete observable effect. And, as an added bonus, they will each be able to overchannel later on, barring multiclass and assuming pure class progression, and that will have the same concrete end results.
If you asked a Barbarian, A fighter and a Paladin to swing at a practice dummy you could observe at higher levels the fighter is hitting more often, but let's assume level 5 and everyone is the same speed. Then ask them to "give it everything they got" the barbarian would rage and deal more damage, the fighter would hit twice as fast as everyone else via action surge and the paladin would deal radiant holy damage via divine smite. Each of these is a concrete effect, observable in the game world that is shared between all people of that class.
There is a serious flaw with your analysis here.
Sure, a creature in game could experiment scientifically, and observe results, and (within acceptable margins of error) conclude that Person A matches the PHB's description of the fighter class, while B must be a paladin from the PHB while C is obviously a barbarian because what we can observe in game matches the PHB's description of the class almost perfectly.
But the point is that creatures in the game do not have the PHB to refer to!
The things they can observe may or may not be tied to class features. When a 2nd level spell is cast, it is knowable in game by observation. Spell levels are a thing. But different classes can cast the same spells, so seeing a fireball doesn't give away an identity that precisely matches one class while denying another.
Using Spell Points to get more spell slots...how 'observable' is that?
What about increasing crit range to 19-20? Surely, that denotes a Champion Fighter, yeah? Er...no. Some Moonblade wielders would disagree. Plus, how 'observable' is that? How can an observer know that an attack was a crit? Some non-crit attacks do more damage than some crits, whether or not a hit takes the target down is more a function of their remaining hit points. Plus, the mere
chance of getting twice as many crits because you crit on 19 and 20 doesn't mean that you
will crit twice as often, because observers cannot tell whether a crit was generated by a 19 or a 20 (let alone being certain that a hit was a crit).
A barbarian's damage resistance? How can an observer tell the difference between that and simply having twice as many hit points?
All this is assuming that creatures let you perform experiments on them. And even this is assuming that there is any creature in game who could be motivated to discover how well the people he knows conform to the 5E rules set that
he can know nothing about!
So, when meeting someone, no you don't
know what class they are. 'Class' is a game construct, not an actual in game 'thing'.