Across the United States, many areas with large populations of Latinos and residents of Asian descent, including ones with the highest numbers of immigrants, had something in common this election: a surge in turnout and a shift to the right, often a sizable one.

The pattern was evident in big cities like Chicago and New York, in California and Florida, and along the Texas border with Mexico, according to a New York Times analysis of voting in 28,000 precincts in more than 20 cities.

Joseph R. Biden Jr. beat President Trump in almost all of these places en route to his record popular vote victory. But the red shifts, along with a wave of blue shifts in Republican and white areas, have scrambled the conventional wisdom of American politics and could presage a new electoral calculus for the parties.