Long before beachfront real estate was sought after by lords, barons and the ultra-wealthy, shoreline property was among the most undesirable land on the North American continent. 

But over the past century or so, that perception has flipped. Now many of the country’s most expensive zip codes are perched on the edge of rising seas.

Few places embody that tension more than Stinson Beach, where home values have surged faster than anywhere else in…