For FFVII it couldn't be easier. Master Magic + W-Magic. HP Plus and MP Plus. HP<->MP. Result? Excellent spellcaster with 999 HP and 9999 MP!

It's trickier for FFVIII, but it can be done. If you primarily use Zell, Squall and Quistis for most of the game, the other three will have low levels when you get the GF Cactuar. So you can have them use the Magic and Spirit bonus, but not the HP bonus. By the time they reach level 99, they'll have Black Mage like stats. Of course, I prefer having as many bonuses on my characters as possible.