I've also seen the AI cast Legions of Steel on groups of units without any armor, which is useless.
Nothing is perfect, but the most "seriously screwed" thing with the AI spell selection is Touch of Madness. That should be script-only, like what was done with Breath of Winter.