Replacing fighter levels (or fighter-type levels) with warrior levels on a 1-2 basis doesn't change CR, but will increase hit-points. He also gets better BAB and saves. The saves sort of give him more hit points, since he'll take half damage from a successful save more often.
This is more difficult to do with a caster, since swapping a PC caster class for levels of an NPC class would lower his caster level and decrease the level of his best spells. You could recover the caster level by using the feat from the extra NPC levels to take Practiced Spellcaster, but your still missing the top level spells. If he does a lot of metamagic, you could more or less recover them with Arcane Thesis.
If he's a caster who can heal himself, a Contingent Spell to heal him has the type of effect that you're looking for. (This is Craft Contingent Spell from Complete Arcane, not the spell Contingency, although that could work too.) A Contingent Cure X Wounds/Heal, triggered when he's at 20% of his hit points or so, will keep him standing longer. It is vulnerable to dispel magic. Similarly, there are some Pact spells in Complete Divine that give you a significant boost when various situtations (including a lot of hit point loss) occur. They cost XP so you won't be casting them everyday, but I believe the duration is "permanent until used" or something similar, so the BBEG could cast it on himself and expect it to last at least a year.