He was positioning himself to be the GOP front-runner in 2020 against Hillary Clinton.
He was scheduled to give a speech to the American Enterprise Institute two days after the election. This would have been the unofficial launch of his "Kasich 2020" campaign. He was planning to build his campaign on a rejection of Trump's stands on trade and immigration.
He canceled the speech within hours of Trump's victory.
Kasich knows damn well that he's playing a losing hand. He's right that some of Trump's views have no place in the Republican Party. THAT'S WHY TRUMP WON THE ELECTION. Any other Republican nominee would have lost in a landslide.
And some would say that losing the election in a landslide was the intent all along (I might agree, given the field of candidates). Then along came Trump. We have been given a gift, I think, a chance to redeem the Republic.