Yes.
This may seem overpowered but there are several drawbacks to the spell:
The target's game statistics, including mental ability scores, are
replaced by the statistics of the chosen beast. It retains its
alignment and personality.
If you transform them into a T-Rex they become an unintelligent beast with an INT score of 2.
The creature is limited in the actions it can perform by the nature of
its new form, and it can't speak, cast spells, or take any other
action that requires hands or speech.
It can't communicate with you while in its new form or use its hands to activate any items, or otherwise perform any task that requires hands or speech.
The target's gear melds into the new form. The creature can't
activate, use, wield, or otherwise benefit from any of its equipment.
It's AC changes to 13 (T-Rex is easy to hit but not easy to kill) making it an easy target from long range. It can't benefit from any magic items it might have or any armor or shields.
Also, the spell requires concentration. This carries two more drawbacks.
If the caster takes damage he or she must make a concentration check to maintain concentration. If it fails, the target reverts form which could potentially put them in a very bad situation, surrounded by enemies and perhaps with low HP (maybe polymorph was cast on the fighter when he was almost out of his own HP).
The other drawback here is the opportunity cost of concentration. The caster can't concentrate on any other spells while he is concentrating on polymorph, which means any other spells available to the caster that require concentration aren't available for the duration. This is a spell list that includes things like hold person, fear, suggestion, haste, slow, wall of fire, web, invisibility, greater invisibility, and levitate, to name only a handful of the concentration spells available to a level 7 wizard.
Consider also that beyond class level 7, there would be even more concentration spells available which might come at a higher opportunity cost than polymorph.
Furthermore, there is also the opportunity cost of learning polymorph. When you first gain access to it at level 7 as a wizard or sorcerer, you have 1 (sorcerer, bard) or 2 (wizard) spell choices available. Druid gets it automatically as they know all their spells -- crazy, right?
As a bard or a sorcerer at that level, you have chosen to forgo all other level 4 spells so that you can transform something into a T-Rex for one hour once a day (maybe more if you spend sorcery points). As a wizard, you have a little more flexibility. In any case, the opportunity cost of choosing this spell over any other spell should come with an appropriate value -- in this case, the ability to temporarily transform someone into a powerful beast and the versatility of being able to transform them into any other less powerful beast.
However, I think you're overlooking the more powerful use of polymorph -- the potential of turning any opponent of yours into a harmless chicken or goat while you take care of the rest of the goons trying to steal your gold. Removing a single powerful enemy from combat is a much better use of your action than creating a powerful ally, when creating a T-Rex leaves the powerful enemy on the table to make attacks against you and your other party members.
This is unclear, and it's ultimately the DM's call. Beyond the general "what the DM says goes", it's not spelled out what exactly it means to have seen an animal. There's plenty of room for the DM to say that it's not seeing the shape that matters, but seeing a living animal with your mystical druidic connection, which won't work with a mere polymorphed form. (Or whatever similar reasoning.)
At first, I thought: it's kind of ... not so great ... for the DM to restrict class options in this way. But, on looking, the only three beasts at this CR from the basic rules (or for that matter, Monster Manual or Volo's Guide) are:
- Ankylosaurus
- Giant Scorpion
- Killer Whale
Many DMs don't allow dinosaurs ("there aren't any in this fantasy world"); Killer Whale is kind of limited even if you have gone whale-watching in the right environment; and Giant Scorpion also seems likely to be rather... environment-specific.
Personally as a DM, I'd let you play this trick with Giant Scorpion, mostly because you don't have any other options in the books and that's kind of lame. But, because of the specific nature of the three listed options, I can understand saying no, too. You might have to make do until next level, when you can shift into elementals.
Alternately, you might ask: "Hey, what beasts of around that power have I seen?" While there are a limited number of beasts listed in the rules, the Monster Manual says:
OTHER ANIMALS
A book of this size can’t contain statistics for every animal inhabiting your D&D campaign world. However, you can use the stat block of one animal to represent another easily enough. For example, you can use the panther statistics to represent a jaguar, the giant goat statistics to represent a buffalo, and the hawk statistics to represent a falcon.
It's reasonable to assume that there exist CR 3 animals which you've seen but which aren't represented. As @enkryptor notes, the rule requires you to have seen the animal ever in your life, not just in this campaign. And, the Wild Shape rules don't say "a beast from the Monster Manual". So, particularly if you're not allowed any of the official listings, I think asking for something you can use is fair.
This could be as simple as "So, what is basically mechanically like an ankylosaurus or giant scorpion that does fit in this environment?" Or, there are several 3rd-party books of beasts (or monster books which contain some beasts) that might be worth looking into (search at DM's Guild, for example).. Or, you could ask the DM to create an option for you using the rules in the DMG, which gives typical hit points, AC, damage per round, etc. Maybe call it a "dire" version of something you've seen before, or pick a name which seems somewhere in power between a rhinoceros and an elephant.
Best Answer
No.
Polymorph says:
It says "Any beast", not "Any creature". While swarms are indeed treated as single creatures for the purpose of the rules, they are defined as "swarms of tiny beasts", not as a "single beast", and thus not a valid form for Polymorph.
Check the answers on this question about Wild Shape and Swarms to see a similar conclusion for a very similar effect.