Most electronic ballasts shuts down when there is a mismatch between the lamp wattage and the ballast wattage.
They are not that much selective and identifying lamps is even not the purpose of that.
The circuit behind looks for failing cathodes - so either rectification, or too high arc voltage drop.
The second may trigger when you put a higher arc voltage lamp onto a ballast designed for lower arc voltage, but the extra voltage would have to be 60V or more, so for most small fluorescent at least double the arc voltage.
And there is usually no detection for an arc voltage being lower than designed.
The thing is, the concept does not expect a wrong lamp vs ballast combination. The concept is supposed to detect just failures of the lamps of the correct type.
And because the arc voltage specification of practically all lamps is a result of compromise between efficacy (too low arc voltage makes the non luminous 15V electrode drop losses too significant). not too high (ballast design complications, leading to more expensive and less efficient ballasts) and manufacturing economy (as much as possible common parts and tooling among products), the arc voltage of most lamps have settled between about 40..100V.
(well, there are exceptions, but these are either high runners optimized for efficacy like F32T8 or specialties, like F4T5 sharing everything except length with other other miniature t5's).
That means most unmatched combination will light up the lamp, including the ones causing overloading or too much stress for either the lamp or ballast components, leading to bad reliability or short life of either part or even safety problems.