I know for a fact that casters will cast spells aimed at your lowest resist from the very first spell they cast. So, if you have high fire and frost-- but no shock, you can be pretty much certain that they will be casting shock.
I don't doubt that the game also would send more dangerous melee types at casters-- or perhaps casters with certain magic resists if you are favoring certain elements in your own spellcasting.