I've gotta say the theocracy, and that's even giving the magiocracy several sizeable advantages.
First, I'll say that the magiocracy has wizards and sorcerers in addition to fighting grunts, while the magiocracy has just clerics and grunts. If you want to include paladins, they'll be effectively grunts with a bit of clerical training, and mages can raise effectively the same thing (granted, at lower power level, but for the sake of discussion the mages are not going to be evil, and the paladin special abilities won't be as useful.)
Were the magiocratic forces to use a completely underhanded move like sneak in, teleport to kill the higher up clerics and bind their souls, that'd be a victory, but that's not really an open fight. And if they just killed the inner circle of clerics, even if they ditched the bodies in the depths of the abyss, odds are at least one of the high level muckety mucks would have a scroll of True Ressurection on hand in case of unforseen circumstances.
But if the mages don't start with a complete upset, they're going to have a very hard time of things. They can use teleport based strikes occasionally, but the number of mages who can do that is rather small, so the guerilla forces won't be as effective as they could be. And while flying, fireballing bombers would be initially disturbingly effective, the clerical forces will likely be trained against that eventuality soon, and will be willing to put whatever resources are necessary to the task of taking out the bombers. So the theocracy will lose a goodly number of its nameless grunts, but the magiocracy will have lost a more significant investment over time. However, let's say the casualties (loss of bombers vs. loss of troops, morale, and items) balances out on a positive note for the magiocracy, and they have an advantage in both grunts and morale. (The latter both from a very large kill rate and the high Cha sorcerers heading things up.)
Now come the grunt battles, both mundane warriors and non-elite casters. (Actually, including some elite units on both sides, but the remaining mages will be stuck with tactics the clerics can at least approximate/level with.) Here's where the mages start losing massive ground. Battles on this scale in D&D tend to be all about high level folks, either killing hordes of low levels or one or two characters of equivalent level before they're spent. But while the mages have only a handful of relatively expensive ways to recover use from dead soldiers (animate dead, wish, and limited wish), injury to magiocratic soldiers is far more lasting than death to theocratic soldiers, and death takes on a much greater toll. You have to be a really big cheese before you're wished back to life (even if it does only take a limited wish), and you're SOL if they take your body. Meanwhile, raising may very well be a reward for soldier who "make the ultimate sacrifice", and it's a sure thing that the big name theocratic fighters are brought back in any way possible if they fall in battle, often being scried on so they can be true rezzed the moment they fall.
We'll assume that the clerical drive for recruits and the mages are both equally effective, maybe a little more on the mages side since they can charm the hell out of short-term recruits, polymorph them, and throw the power troops after the clerics. (Keep in mind that this will have seriously bad repurcussions on the ones who live long enough to throw off the charms, often with at least a level worth of experience to boot.) The clerics, meanwhile, will preach about the glories of martyrdom (and hint at the hope of glories with raising), use healing to keep their recruits from dying long enough for them to gain levels, and have more of a disposable population base since they can create their own food, thus subsiding on fewer farmers. (And even if we give the magiocratic forces magically enhanced delivery lines, all of them give an objective to attack. Enough low level clerics to round out a create food and water routine are much more flexible, and not too unlikely in a D&D universe.)
So you'd basically have a war of attrition against the mages, culmunating on an assult on the capital. A mage without spells is as effective as a fighter type a small fraction of their level, and a mage who doesn't use spells effectively doesn't have any, so you'll have a group of war-hardened troops send a few sorties into the city to deplete the casters (or kill them, if they take up the fool notion of saving their spells), and then you'll have some of the really big cheese clerics lead the final assult. The heavily depleted mages would obviously fall against a better stocked group of foes, and would have their options limited to surrender, flight, or trying to take down their foes in a self-destructive flash of glory (E.G: retributive strikes). Fallen higher ups will have ressurection contingencies in place, though, and probably at least one grandiose Miracle for protection, so the grand mages are likely to flee, and either become obscene level guerilla fighters, or try to rebuild their magiocratic dreams with some other group of people, far away from the current battlefields.
(Granted, that last option opens the door to a grudge match style win later, when you have a few low level suicide mages teleported into the high clergy's homes and gathering places, followed by a large number of mage lords teleporting in and claiming the place, but we're talking about one war, not the historical consequences.)