Until the day that Lehman collapsed, that race was neck and neck. It was after Lehman that the economy really spiraled, Obama opened up a lead and never looked back. I don't think any Republican was going to win in '08 given the outgoing president's disapproval ratings, the economic state in November, etc. It all was the perfect storm for how the election turned out. Then, choosing someone like Palin for your running mate didn't help matters.
Weren't McCain's advisers trying to nudge him into picking Romney as his VP? IIRC no one was expecting Sarah Palin to be his VP choice and most were assuming it would be Romney or Pawlenty or even Lieberman.