Do not forget that vampires can summon swarms or packs of wolves, rats, bats, etc. While individually not a big deal, they can delay and harass your party (especially spellcasters) when appearing in large groups. You don't want your mage's counterspell of the necromancer's Symbol of Pain spoiled by nearby wolf taking an attack of opportunity. Perhaps when you are selecting your final spell line-up keep a slot or two open for some anti-vermin (see Repel Vermin spell) or anti-animal (good ol' Fireball or Cone of Cold) spells, even spells that do not affect the undead but are still useful for dealing with large numbers of weak critters such as these. Consider Cloudkill for example.
If you don't want to blow higher level spell slots for these direct-action, consider lower level spells that will delay or discomfit this kind of swarm attack: e.g. Fear, Rainbow Pattern, Wind Wall. All can disrupt a concentrated swarm attack and buy you time.
Speaking of buying time, if you know you will be facing hordes of undead, consider spells that will enable you to control the landscape of the battle and prevent an overwhelming number of baddies from reaching you all at once. Consider Move Earth, Soften Earth and Stone, Transmute Rock to Mud, or the various "Wall of ..." spells to shape the battlefield temporarily or permanently. Create chokepoints the horde has to pass through or create safe havens where you cannot be flaked from.
Think of ways you can bypass the irritating low-level cannon fodder undead / vermin and get to the necromancers & vampires who will truly be hurting you with spells cast from behind their wall of lowbie allies. Look at Air Walk, Fly, Alter Self (for wings), or Dimension Door. Anything to get you face to face with the bad-guy spellcasters. The undead army can't be re-raised if its leaders are killed first.
Good luck!