Many also vowed to stand in opposition to the Trump administration, gambling that Mr. Trump and congressional Republicans would disappoint voters and prompt a return to the Democratic Party they rejected.