I think in a nutshell that Obama's election can be summed up as a nation's knee-jerk reaction to an unpopular Bush presidency (as opposed to the merits of Obama). If this election happened in 2000, McCain would have won.
It's no doubt that the country shifted a bit to the left, and that's probably partly due to Bush's unpopularity, but whether McCain could have beaten Obama if they ran in 2000 depends on a lot of things. Obama's speech at the DNC in 2004 propelled him into the public... In 2000, he hadn't made that speech yet. I didn't even know his name in 2000. I knew McCain, he was the guy Bush beat in the primary thanks to negative campaigning and the support of the fanatical right. I would have liked to see McCain vs. Al Gore in 2000, and it's fairly likely that Gore would have won that fight.