Bill de Blasio, New York City’s new mayor-elect, didn’t spend much time during the campaign talking about climate change, but he’ll likely spend a lot of his time at City Hall dealing with it.

New York finds itself these days with an unusual conundrum: Its biggest problems are largely the byproduct of its biggest successes. Just 20 years ago, New York was, like American cities generally, blighted by rampant crime and less populated than at its mid-century heyday.

Today, New York City’s central challenge is one that virtually any other city would love to have: Too many rich people want to live there. But Wall Street bankers, trust funders, and wealthy foreigners looking for a pied-à-terre have driven up the price of housing to levels that threaten to eject the creative classes that have powered New York’s renaissance. The high cost of housing is also the main reason New York’s homeless population is at an all-time high.

The massive gap between rich and poor, the loss of diversity in the most centrally located neighborhoods, and the lack of affordable housing were the problems identified by de Blasio in his “tale of two cities” campaign spiel. De Blasio won in a landslide Tuesday on a promise to increase the supply of affordable housing, raise taxes on the very wealthy, and expand educational opportunities for those left behind by New York’s current boom. Meanwhile, crime has been so successfully tamed — the murder rate is one-fifth of its 1991 peak — that de Blasio has proposed to reduce the use of aggressive policing tactics such as stop-and-frisk.

Grist thanks its sponsors. Become one.

But other serious challenges loom in New York’s future, even though they were hardly mentioned in this year’s mayoral campaign. Indeed, they are arguably already here: extreme weather events caused by climate change, and felt especially hard in coastal areas developed during the city’s boom years.

New York is built on a collection of islands, with 520 miles of coastline and entire neighborhoods constructed on landfill. One year ago, Hurricane Sandy flooded New York’s low-lying neighborhoods, from Lower Manhattan to the Rockaways in southeastern Queens, leaving elderly, impoverished New Yorkers stranded in high-rise housing projects without power for weeks. Some families are still displaced, living seven to a hotel room.

Grist thanks its sponsors. Become one.

Global warming leads to melting polar ice caps, which lead to higher sea levels. Global warming is also raising surface water temperatures, leading to larger, more frequent storms. The former could permanently submerge miles of New York’s currently inhabited land, while the latter threatens to periodically topple buildings, destroy power stations, and knock trees onto cars.

New York Harbor is where the Hudson River meets the Atlantic Ocean, and what we call the East and lower Hudson Rivers are actually tidal estuaries. Much of New York’s recent economic and real estate development has been in the very same waterfront areas that are most at risk from climate change. Tribeca, DUMBO, and Red Hook have seen former waterfront warehouses filled first with artists and then well-heeled professionals. A year ago, they saw neck-high water flowing through their streets.

Mayor Mike Bloomberg, aware of the urgent need for housing, has encouraged the development of New York’s waterfront neighborhoods. After Sandy, the Bloomberg administration created the Special Initiative for Rebuilding and Resiliency, which produced a massive report, released in June. The report found that the next hurricane could be even worse: “With greater winds and more rain, Sandy could have had an even more serious impact on the areas of Staten Island, Southern Brooklyn, and South Queens that experienced the most devastation during the storm. And while Sandy brought the full force of its impact at high tide for these southernmost areas of the city, it hit the area around western Long Island Sound almost exactly at low tide. As a consequence, parts of the Bronx, Northern Queens, and East Harlem were not as affected as they could have been.”

But Sandy was plenty bad and its effects will last for years to come. On Monday, The New York Times reported that the Metropolitan Transit Authority will be forced to continue cutting back service and spending billions of dollars for years to come to deal with the damage Sandy wrought. While the MTA got the subways running again within days, it has recently had to shut down stretches of the R and G lines to repair tunnels that were flooded. There will be an estimated $3 billion worth of repair work for each of the next two years, about double what would otherwise have been needed.

New York cannot afford to be unprepared for climate change. As Bloomberg’s report lays out, the city must invest in a wide array of both hard and soft anti-flooding infrastructure improvements. Buildings must be elevated, shorelines must be regraded, beachfront boardwalks must be rebuilt with gradual rises in elevation. Buildings must move their power supplies upward, while neighborhoods must move their power lines downward, wrapping them in water-resistant materials. Sidewalks will have to be made permeable, to wick floodwater back out to sea. Meanwhile, the city must continue its efforts to be a global leader in reducing its own carbon footprint.

Though he vaguely promised to adhere to Bloomberg’s climate change agenda, de Blasio didn’t make climate preparedness an issue in his campaign. But it will likely be the central challenge of his mayoralty, and his successor’s as well.

De Blasio said in his victory address that “the city has chosen a progressive path” in electing him. If he really wants to help all New Yorkers thrive, he’ll get as serious about climate change as he is about economic inequality. Reducing the city’s greenhouse gas emissions and preparing its neighborhoods for storms and rising seas is a moral obligation for a self-described progressive, no less so than housing the city’s homeless, enhancing its social mobility, or welcoming its undocumented immigrants. And climate adaptation is a pragmatic imperative too. It will be expensive, but as Sandy demonstrated, failure to invest on the front end will cost even more later on.