Mr. Rubio’s ill-fated campaign for the White House, which was virtually broke by the time Tuesday’s primary arrived, was built on mistaken assumptions about the mood and preferences of the electorate, a misplaced faith in the charisma of the candidate and misguided predictions about the course of the Republican race.

He promised to change the face of modern conservatism and to make the Republican Party more appealing to young and minority voters. Instead, his gauzy calls for a generational torch-passing were ill suited to a Republican electorate who wanted someone angrier and more hostile to the system than Mr. Rubio could bring himself to be.

Mr. Rubio’s campaign relied not on any one slice of the Republican Party but on a broad coalition of voters who would unite behind him as a safe and rational choice. But in trying to be too many things to too many people, he won over too few.

The final weeks of his race were a descent into political and personal embarrassment. As his wife fretted audibly about the dwindling size of his crowds, Mr. Rubio — who had tried to combine John F. Kennedy’s oratory, Ronald Reagan’s inspirational conservatism and Barack Obama’s message discipline — instead wound up apologizing for crude bathroom jokes.

In an interview aboard his campaign bus, Mr. Rubio sounded despondent as he contemplated how ugly the race had become — and his role in its devolution.

“I kind of said, ‘Gosh, you know what? It even got to me,’ ” he said, recalling a difficult conversation he had with his embarrassed teenage daughters, who asked why he had belittled Mr. Trump as a pants-wetter with a bad spray tan. He could not give them a good answer, he said. “And I’m someone who’s run this whole campaign trying to be above all that stuff. For a brief moment, it even got to me.”