I would expect a Kerry victory to butterfly McCain's nomination. McCain was nominated in a year when everyone expected the Republican to lose. Like Dole, McCain faced few serious competitors for the nomination. If Kerry had squeaked into office in 2004 and then presided over a financial collapse, the GOP would have been much more bullish about their chances in 2008, resulting in a more crowded field and heavier spending.
The political landscape would be radically different in many ways. The Bush brand would be intact, and partially vindicated by Kerry's ignominious term, at least in the eyes of Republicans. Instead of renominating W, the faction would line up behind Jeb Bush, a marked improvement over his brother while being ideologically almost identical. In all likelihood, McCain wouldn't even attempt to run against Jeb, who would face a handful of regional pygmies (Giuliani in the east, Romney in the west, and Ron Paul taking the anti-war 10%). Jeb would sew it up early, name a midwestern woman as his running mate, and defeat Kerry by a modest but incontestable margin.