Presumably federal or, more likely, state government could step in as an insurer of last resort, if the alternative is to see their state depopulated through free market insurance pressure on the housing sector. They would be better off taking the hit of moderately unprofitable insurance policies than seeing their region be ruled out-of-bounds for homeowners.
Obviously that doesn't address the root cause, although California does at least attempt to pass legislation at the state level to combat climate change, I believe.