McCain did lose.
And Reagan didn't become a major political figure until he was in his early 50s, and made the speech for Goldwater.
It could be a problem in the Democratic party that Hillary Clinton has been a public figure since her husband ran for Attorney General of Arkansas in 1976. Statements she made then might become controversial when someone digs it up in 2015.
Candidates who have been in office for a long time do tend to lose. Bill Clinton was one of the youngest Presidents ever. In '96, he defeated a guy who had been in Congress for 36 years. In 2000, George W Bush (whose political expertise was limited to six years as Governor and a failed congressional bid) beat a man who was elected to congress 24 years earlier. Then he beat Kerry, who had been a Senator for 14 years. Then Obama, who had been in Congress for four years, beat McCain, who had been in Congress for 26 years.
McCain might have won had it not been for the diplomatic debacles and economic meltdown associated with the incumbent President. Such created a unique opening for a President like no other in American history, one with a characteristic that would ordinarily cause him to lose.