McClellan had been a popular commander on several counts. He had come to command the Army of the Potomac after winning two small victories in the modern West Virginia in 1861, which was two more victories than any other Union commander up to that time, and led to that state rejoining the Union.
McClellan was a great "book" commander, having graduated second in his class at West Point. This showed in his "administration" and retraining of the Army of the Potomac. This greatly improved the Army's morale after the lost Battle of Bull Run.
McClellan's main weakness was his lack of "real" fighting experience. Like many other American officers, he had served in the Mexican War, but unlike them, he had not acquired battle experience, having arrived too late for one battle, and been sick during another one. He therefore preferred "Fabian" tactics, the idea of trying to wear out the South with a minimum of loss. which was particularly popular with the soldiers, and not out of temper for most of the northern public.
The idea was actually soundly executed as formulated, the Peninsular Campaign was actually a "Pyrrhic victory" for General Lee, who lost more men both absolutely and proportionately. Not even Grant, the ultimate victor could inflict more absolute casualties on Lee until the very end. (And Grant was regarded as a "Butcher.")
Basically, McClellan could be trusted not to "lose" the war, even if he did little to win it. Particularly after the Pope fiasco, that was enough for the "average" Northerner, who was lukewarm about the Civil War, just not enough for Lincoln and the "Radical Republicans."
No less a historical figure than Winston Churchill (in "A History of the English Speaking Peoples") opined that the final outcome would like have been the same (a Northern victory) with less bloodshed if McClellan had been left in charge. The reason is that Ulysses S. Grant was winning in the west, capturing 'Tennessee in 1862, and Mississippi in 1863, thereby cutting off these states plus Texas, Louisiana and Arkansas from the main Confederacy, pursuant to General Winfield Scott's Anacaonda Plan. In 1864, Grant and Sherman could have traversed Georgia, cutting off another slice (Georgia, Alabama, Florida) of the Confederacy. Eventually, the South would lack the "critical mass" to survival.
McClellan's role in this exercise would be to tie up Lee, his best troops, and his best generals in Virginia, so that the North could defeat the rest of the South "piecemeal."