Actually, in terms of bonus feats, Hierophant is likely the way to go. 5 metamagics in 5 levels, with no loss of caster levels.
Drow is a bad idea. The SR isn't worth 2 levels, especially since there's that Assay Resistance spell in CA. Amongst the things you'll lose, the one that hurts you the most is the extra epic feat. You'll also lose the bonus feat for human. If you absolutely have to have the SR, Spell Resistance is only lvl 5 and lasts 1min/lvl.
Get Delay Spell. Use it together with Time Stop to pop off an impossibly large number of spells in a single (objective) round.
Burn a Miracle to give the dragon -9 to all saves. Have the wizard do the same with a Wish, if your DM allows it to stack.
Alternatively, consider going toe-to-toe with it. Not as crazy as it sounds. A fully buffed, shapechanged spellcaster with Wraithstrike, Divine Power and Greater Visage of the Deity can be obscenely powerful up close - unless you get Disjuncted.
That's the other thing - the party needs a counterspeller to watch for three spells: disjunction, antimagic field, time stop. Those can screw you over bad.