Several readers commented that McCain was a guaranteed loser in the 2008 election. Their theory was that as a 'novelty' candidate, Obama was picking up huge numbers of votes, even from Republicans. He was younger, better looking, gave better speeches, etc. All of that was true, but McCain had some serious advantages, specifically the economy was fairly good through the late summer. It only collapsed in September. That was when McCain's poll numbers dropped through the floor. McCain had a realistic chance up until then.
However, the real election wasn't Obama vs. McCain, it was Obama vs. Bush. By the end of his Presidency, George Bush was the most despised President since Richard Nixon. (This is not an opinion; check the historical records of popularity indexes.) Bush had two disastrous wars, had screwed up Katrina, and by 2008 it was obvious we were trillions in the hole. None of this happened in this timeline. McCain would have a very good chance under these conditions.