this right here is kind of answering your own question. if your backline caster is being attacked, then a tank is not doing their job somewhere. make sure you actually have enough engagement. it seems like you get the gist of it, but just to reiterate: most characters don't have engagement by default and a shield is the main way. some of the real "tank"-type classes have additional ways to get more engagement (barb, fighter), and a few casters have abilities that grant more engagement. generally one engagement per melee is not enough i find to keep my caster-heavy parties safe. fighters are real great for this - one of their stances gives them +3 engagement *and* damage reduction.
edit: do you actually see the engagement lines? it should be pretty obvious which characters are engaging each other. disengagement attacks are far more punishing than normal attacks (huge acc bonus, huge damage bonus)
Does the enemy have engagement? If not, then just step away and let the enemy retarget your tank, because they'll be engaged (if your tank is properly set up) and the AI is extremely reluctant to break engagement.
If the enemy has engagement you should, as some suggestions:
instead have your non-tank melee target non-engaging targets
interrupt/prone/knockup them (while they're interrupted, they can't engage)
hit them with something that grants staggered or dazed (eliminates engagement)
hit them with hard crowd control (stun, paralyze, terrify)
edit: buff your non-tank melee with swift (can't be engaged) or equip non-engaging armor
if you're still struggling, i would question what that other melee character is. most non-tank melee-ers have escape abilities of some sort, even if it's just bonuses against disengagement. Even a barbarian built to be a glass cannon has sprint and leap. Rogues are the most glass-cannon-y of melee characters, and not only do they have tons of escape mechanics, pretty much all their abilities interrupt, which lets you run away if needed. the AI also likes to target lower health characters - try picking up tough, not-dumping your CON, etc. a tank with lower health but high defenses will be a juicy target for the AI. all else fails, equip your non-tank melee with reach weapons (staff, pike, there's a reach unique great sword).
edit: worth pointing out there are plenty of (even some pretty major) systems that have tanks but no system of aggro or taunts (which are both pretty MMO specific mechanics imo). Generally they rely on making it extremely punishing for enemies to *not* target the tank, or to step away from them. same principle.
it's also worth pointing out that while some AI will love to just target squishier characters (bad news for glass cannon melee with no mobility), some AI are just sticky to their first target (good news if it's your tank). The AI kinda varies. Enemy rogues, for example, can get really punishing because at mid-levels bc they frequently have engagement and will use mobility spells to jump past your front line, trapping and absolutely wrecking your squishier characters - this AI's aggressive willingness to go after squishy characters (even eating a disengagement attack if necessary) is kinda unique to rogue types. Of course, that's what you should be doing to them, given the chance