Skyscrapers go straight down into bedrock - the Prudential and Hancock in Boston are built on landfill in the Back Bay, but it doesn't matter, because their foundations go way past the mud. There are a few architectural/area combinations you want to avoid (you probably don't want 4-story rowhouses in the Marina in SF, for example), but most of the land area in these cities is solid. Western SF, for example, is actually at a high elevation immune to most reasonable sea level rise projections:
https://ss2.climatecentral.org/#12/37.7341/-122.4540?show=sa...
(The East Bay and Palo Alo are screwed, but that's not the subject here.)
Also, expensive high rises benefit the working poor by giving rich yuppies a place to live where they don't bid up the same housing that working-class people have been living in for decades. If you put up luxury condo highrises in SOMA where tech workers could walk to their offices, for example, then maybe they wouldn't be bidding up the price of 1BRs in the Mission to $4k/month. Landlords are generally unwilling to let housing go vacant, because even a 2-month vacancy can destroy much of their profit for the year. So one way or another, if you build enough housing the price will adjust itself to the point where everybody gets housing.