Bread-and-butter issues were the focus of campaigns across Taiwan. The voting nevertheless took place against persistent military pressure from Beijing, which routinely encircles the island with fighter jets and warships.
The DPP has not held the Taipei mayor's office for nearly three decades. A victory for Shen would have been a major upset.
"It's a shame,"one Shen supporter at his campaign rally told BBC Chinese.
The local results will not change policy toward China, which claims Taiwan as its territory. Officials and observers instead treat them as a measure of party strength ahead of the presidential election.
In its first statement since the vote, China's Taiwan Affairs Office said:"No matter how Taiwan's political landscape changes... It cannot stop the historical trend that the motherland must and will inevitably be reunified.".
Yang said the inability to hand the Taichung mayoralty to a KMT successor would jeopardise her chances of securing that nomination and exacerbate infighting in the party.
Chiang's reduced majority underscored a difficult picture for the KMT, which was defeated in areas historically considered party strongholds. The DPP won in other places long regarded as opposition territory.
"Beijing will have to closely monitor the power struggle in the KMT in the coming months and then determine whether they need to recalibrate their approach toward dealing with the 2028 presidential election,"Yang said.