According to this answer, anyone who sees a spell being cast can use a reaction to make an Arcana check with a DC of 15+spell level, with advantage if the spell is on your spell list. Success means you identify the spell, which presumably means you also know how to get rid of it.
However, let's think about this. You're in battle, and an enemy spellcaster walks up and waves his hands and shouts some nonsense words, and suddenly your friend turns into a bunny. You probably wouldn't know to kill the bunny, but you'd definitely know that you should break the spellcaster's concentration if you want your friend back!
You've written that you think it would be difficult for the NPCs to figure out which of your party's several spellcasters had cast the polymorph spell, because several of them were all casting spells in the same round. I think you should allow your NPCs to be aware of turns, and to be aware of whose turn it is when a given effect happens. Your player characters are keenly aware of this, so it seems only fair that the NPCs should be aware of it too.
The best response to this is in encounter design. Either (1) don't give the player characters a battle where there's only one important foe, or (2) if you must do that, give the foe some points of legendary resistance, so it doesn't go down so hard when hit with save-or-lose effects.