Property/Casualty insurance (auto, home, work comp, etc.) are priced by analyzing recent loss experience, then trending loss costs forward (as medical costs & replacement costs go up over time).
Hazards that are infrequent and spatially-correlated (hurricane, tornado/hail, fire) are often priced by using simulations, which take into account the nature of the event, engineering simulations, and insurance policy terms.
Flood insurance is incredibly politicized, as it's handled at the federal level. Floods are typically considered an "uninsurable event" given that if you live in a flood plan, there's a high likelihood that you'll have a loss due to flood--less of an "if" than a "when".
Flood insurance is sold & claims are handled by insurance companies, but it is effectively reinsured 100% by the federal government. Actuarial studies have show the premiums to be highly inadequate, but there has been legislation that aims to reduce that inadequacy.
As for floods... I dunno, maybe insurance requiring some portion of the house that is higher than the flood plain and that the house is not in danger of becoming unmoored for any sort of sane rates. I imagine that would make housing in places way under the flood plane or that face both floods and hurricanes expensive to build in, which is the point.