OTOH, take 30 hp of damage before losing conc, and its still better than healing potions.
Only _maybe_. If you don't lose concentration. If you even get attacked and hit at all. If you're enemy's attacks aren't magical...too many ifs.
Or you could cast polymorph, get a boat load of bonus XP that don't have all these restrictions and don't cost 100gp.
No matter how you slice it, as is, it just doesn't seem very useful, especially for NPC casters.
In the case of our game, this was in PotA. The "as written" encounter had the caster paired with a weakened version of a stone golem (I replaced it with Earth Elemental stats...but both already have resistance to non-magical weapons). The caster had stoneskin and polymorph prepared. Using stoneskin on himself seemed pointless. Using it on his stone golem was more useless. Because an NPC that survived another fight ran into his room that gave him something useful to cast it on but polymorph seemed much more useful.
Let's compare to other 4th level concentration spells (that cost 100gp to cast)
Banishment: Remove a foe completely from the fight for up to 1 minute (allows one save)
Aura of Life: Gives necrotic resistance to all allies within 30', can't have hp max reduced and revivifies dying allies.
Aura of Purity: You and allies can't be diseases, resistance to poison and adv on saves to anything that causes a bunch of conditions
Conjure Minor Elementals/Woodland Beings: Conjures 1 or more minions (is there a list somewhere of what you can cast...this spell seems somewhat useless without it).
Evards Black Tentacles: Turns an area into difficult terrain, can restrain and damage creatures that start their turn in it.
Grasping Vine: Pull a creature 20 feet over and over (it should at least restrain its target...but still..could keep a foe out of battle if used right)
Watery Sphere: Suck up Large or smaller creatures and restrain them
Arcane Eye: Recon Drone (with dark vision and can go through very small spaces)
Compulsion: force enemies to move in a direction
...and so on...
If I were to house rule this spell I think I'd just have it negate any damage from any source (or maybe from any weapon attack) until you have taken 40hp, plus 10 hp per slot above 4th. So if you use a 4th level slot and take 40+ damage on a single attack, all that damage is negated then the spell ends. That seems worth concentration and 100gp. Maybe say adamantine weapons ignore the spell.
Without house ruling it, I just don't see it being useful.