I wouldn't even go so far as to cap the HD of the monster with the caster, i.e. "You can't turn into a huge ancient dragon because you're only 7th level and they have 20 [or whatever] HD."
To my knowledge, the whole polymorph thing still only lets you be you...as it were. If you turn into a dragon, you're a huge (or colossal or whatever the size category is these days), you can fly, you can breathe fire (or acid or whatever), get the dragonfear aura (since you are, now, a dragon sitting in front of these people), take on their AC...but you're still only a 7th level caster.
That is [probably most importantly], you still only have your HP...you don't get the hypothetical extra 5HD (or whatever it might be) or other non-innate powers/abilities. Where an ancient dragon has lived for thousands of years and spell-casting abilities, polymorphing into one doesn't grant you extra spells or knowledge. Will you be able to do things you can't normally do? Sure. That's kinda the point of turning into something else. You'll be tougher...but not going to be "unkillable." [is that even a word?]
The chips are down, your caster's lost half their HP. One of the party fighter's is down with the cleric tending them...and 20 reinforcements to the hobgoblin guards have just burst into the throne room. The wizard polymorphs into a troll (not the least of which for the regeneration to his HP, but possibly might get a better AC also) and wades in next to the dwarf paladin (who thinks she's gonna take on the lot of them herself) and starts swiping troll claws and rending his way through as many guards as he can. Still only has his normal HP (but now getting +2 back per round) and his normal chances to hit/"BAB" or however attack rolls are being handled.
I'd be more than happy limiting druidic shapechanging back similar to their 1e origins and saying that Druid shapechanging can only be to normal animals...not magical beasts or other humanoids...Add in humanoids as a higher level ability...and/or giant versions of normal animals ...maybe add in magical beasts at a very high level...or not. But the restrictions of above apply. Take on the natural abilities and AC, but your HP and attack rolls are still the same.
I always thought polymorph was very powerful...and always thought it should be. So, if you use it, you should be more powerful than the level you are. Fighting some Frost giants? Turn into a fire giant or a hellhound. Why would anyone want to polymorph into a goblin in a combat situation?
I guess the "grey area" comes in with special abilites and where they sit...i.e. I believe in 1e you could turn into dragon and fly...but not breathe fire (or whatever the breath weapon of your dragon choice was). That never made sense to me. Or a troll and regenerating...Are those "natural abilities" or are those "magical add on things"? I say natural, but that's how I view/define them in my game world. If you turn into a fire giant, of COURSE you are immune to fire damage!
Unfortunately, this leaves the field wide open for certain people to get into a snit because it could be viewed as a "case by case/DM's call thing" and they believe nothing should be a case-by-case/DM's call thing.
I do like Celebrim's suggestion for Polymorph Other. Or even, I don't know if it was 1e or BECM, but I believe polymorphing other was explicitly only allowed to turn the Other into something small and harmless. Toads or bugs or otherwise easy to ignore or step on things...like, no bigger than a house cat (which could easily kill low level people in 1e and BECM. hahaha. But that's besides the point).