Hmm. Here's how I would play it out.
I refer your attention to the description of the Runewell on page 361 of the anniversary edition:
By the time the PCs arrive, Karzoug’s runewell should be almost fully charged—once it becomes completely charged (at a point you should feel free to determine yourself, should the PCs not defeat Karzoug on their first visit to the Eye of Avarice), Karzoug can step into the runewell and emerge in area X16 of the Pinnacle of Avarice, once again free to spread his evil across the world.
By the time the party returns from Magnimar and their few days of rest, Karzoug is on the very cusp of freedom. He needs one more soul -- just one more soul with even a hint of greed would be enough to set him free.
So, arrange for that to happen part way through the battle. It could be some random soul -- perhaps a villager from Turtleback Ferry who visited the Paradise dies, sending that last tiny shred of greed in. Perhaps Karzoug uses a quickened Arcane Mark to place the Sihedron on one of the PCs who has shown a tendency to greed, and then focuses fire on that PC till they go down -- the latter would be much more dramatic, but harder to pull off.
Regardless, arrange events so that the final soul reaches the Runewell immediately after Karzoug takes a turn. Let the PCs have one final round to take him out. If they can't, he beelines out of the Eye of Avarice and teleports away immediately on exiting. You would need to sub in a Greater Teleport at level 7 for this.
Then the campaign proceeds as described in the "What if Karzoug Wins?" section on page 368.
If you go this route, have a plan for letting the PCs have another crack at him. Free of the Eye of Avarice, Karzoug has no reason to fight the PCs, and every reason to avoid direct confrontation by sending wave after wave of minions against them. If the players can come up with a plan for forcing him to ground, great. If not, you should have some idea of your own that you can steer them towards, because, as a player, it would really suck to invest a huge amount of time in a campaign, get to the end, and lose.
Part of this depends on how comfortable you are with doing high level homebrew. If Karzoug gets loose, the nice tidy rails the campaign has been on up to this point fade abruptly into the grass, leaving you to find your own way. If that's not something you feel up to, then -- even though it breaks realism a tad -- just run it as written. Assume that the swathe the PCs carved through Karzoug's minions has left him basically without the ability to finish what he started, at least for the few days they want. He's stuck. Take away any negative levels he's got, and prep the room as best you can, and then he'll just have to sit there and wait his fate.