Where insurgent national Democrats support charter schools, they do so carefully: Representative Jared Polis, the Colorado Democrat whom voters sent to the governor’s mansion on Tuesday, founded two charter schools. But he has made sure to criticize Ms. DeVos’s vocal brand of school choice advocacy.

Tuesday’s results were compounded by other recent blows for charters in liberal states.

In 2016, Massachusetts voters rejected a referendum that would have expanded the state’s high-performing charter schools. Though backers poured $20 million into the race, it was no match for Senator Elizabeth Warren and Senator Bernie Sanders, progressive stars who opposed the initiative.

Philanthropists tried again in California over the summer, when they spent $23 million to bolster the former Los Angeles mayor, Antonio Villaraigosa, in the primary for governor. Mr. Villaraigosa, a Democrat, was easily beat by Gavin Newsom, the Democratic lieutenant governor, who has been vague about the role of charters as he seeks to make California an epicenter of opposition to the Trump administration.

Some advocates find a sliver of hope in the fact that even the most liberal Democrats acknowledge that charter schools are here to stay. Many opponents want to slow growth, not destroy charters.

“No matter how hostile some of the cities get to charters, the charters have endured,” said Jeanne Allen, the chief executive of the Center for Education Reform, a national school choice advocacy group.

In New York, the insurgent Democratic candidates’ criticism of charters was somewhat less central to their campaigns than their support for traditional public schools. And though most of those Democrats said they would reject any plan to expand charter schools, they are aware that charters are popular among some families in their own districts.

“You don’t want to alienate anybody,” said Alessandra Biaggi, who in the Democratic primary unseated one of the charter lobby’s most reliable allies, State Senator Jeffrey D. Klein, in a Bronx district. “I understand why charter schools exist, I understand why they have come to the Bronx, I really get it. But we’ve got to focus on improving our public schools.”