Well the party is actually quite large. In the dragon/witchfire encounter it was the rogue.,swashbuckler,ranger,wizard,fighter,cleric and an invulnerable rager all lvl 7. The dragon and witchfire were only cr9. It should have been about equivilant challenge.
I would note they are CR 9
in a typical game setting. In your game, with no Arcane casters, perhaps they are no longer CR9. Tinkering with the fundamental assumptions (ie a balanced party of character types; wealth per level, item availability) can result in CR's no longer being an accurate measurement.
Are Undead as challenging against, say, a party made up entirely of Clerics, Paladins and Necromancers as they would be against a group with no one with channelling abilities, and Arcane casters specialized in charm and mind-affecting spells?
The problem was only 2 chars can hit flying and I forgot to take the witchfires dr vs. magic into account
Both special abilities are commonly overcome by offensive spellcasters, so this would, to me, be a much more challenging encounter against a group lacking spell power. Not sure why only two characters have range, though. It's easy enough for most characters to carry a ranged weapon, even if it's intended only as a backup plan, and even firing normal arrows is better than standing around waiting to be attacked with a breath weapon.
The Witchfire is more problematic - if range is only a backup, then ranged attacks that can seriously threaten it are unlikely. Melee is pretty painful, and a lack of arcane firepower makes it a pretty tough opponent. "Fall back and defend the Cleric" seems like the battle plan with that team (especially if we pull the wizard).
There's also PC attitude. Maybe "we only have two guys capable of attacking at range" should not lead to fighting a dragon out in the open, but to fleeing for better cover. Force the Dragon to land to follow you through thick trees or into a cave, and melee becomes a more viable option. "I'll just stand here and keep using the same tactics I always use" can be a pretty suicidal tactic.