Any full spellcaster with an area of effect spell? Shoot a fireball will do that if just TWO targets are hit! There are even second level spells that will do it.
Shoot, my arcane trickster rogue does it at 6th level when they get a second sneak attack from a reaction. Our Paladin do it with smiting at those levels too. I think our ranged attacking ranger does it too at 8th level. Pretty sure our polearm master fighter with GWM is doing that too at 8th with his magic glaive.
And remember, you have 1) no ranged attacks, and 2) no magic attacks, a 2 intelligence, a +1 wis mod, and a -1 charisma mod, and you cannot communicate with your teammates (not even telepathically really as you have a 2 intelligence now) while in polymorph form. It's REALLY not a wise form to be in if you can help it, particularly at the levels you're talking about with a t-rex.
Again, we've ALL played with polymorph - I don't even know how this is a debate 6 years in, since it's one of the most popular spells. Blowing your higher level slot to polymorph someone before their hit points are lower is not a good use of the spell most of the time. It's a great spell when you need it because you've been hit a lot, particularly if the healer is low on cure spells. But, just for the attack and damage bonus outside of those considerations? Not a good idea most of the time.