In that case, your expectations of PC abilities don't map very well to the core rules.
Assuming standard PC wealth and standard array stats, a 12th level fighter will typically have:
Str 22 (15+3 lvl +4 item). A 12th level barbarian will typically have Str 30 (15+2 1/2 orc +3 level +4 item +6 rage). So, the check is very difficult but not impossible for the fighter and only moderately difficult for the 12th level barbarian. By 20th level, strength is more likely to be around 31 (15+5 level +5 book +6 belt) for the fighter and 41 for the raging barbarian.
Similarly, excluding dodge and dexterity bonuses to AC, a 12th level fighter will often have:
+3 fullplate, +3 shield (animated if he uses a two handed weapon), +1 ring of protection. (And if he doesn't have +3 armor and shield, he will when the cleric casts magic vestment on them). That's AC 27 right there. A barbarian will often be slightly lower: +3 mithral breastplate, +3 animated shield, +1 ring of protection=AC 24. If he's raging, knock two points off of that, so he'll take a little bit of damage but not much. By 20th level, either character can be expected to have ACs between 35 and 42.
Also keep in mind that there are several other counters to the spell other than the mentioned teleport. Freedom of Movement (the big one for divine casters), blink, dimension door (the big one for arcane casters), gaseous form, etc would all work to enable a character to evad the spell. Flight would be very effective as well. A rogue or monk with sufficient ranks in balance could even, in theory, balance on top of the wall of thorns as long as they weren't in the effect when it went off (if they were, the monk has to have an ally with dimension door, freedom of movement, etc, or abundant step out of the wall and the rogue will need help from his allies or use magic device). (And, if all else fails, the trapped creatures can always pull out bows and fire back just as effectively as their enemies can fire at them).