There are several factors that adult ferns need to survive (ignoring pests or disease):
moisture in the soil;
moisture in the air;
suitable nutrients in the soil;
sufficient light for photosynthesis;
protection from wind;
protection from too much sunlight;
protection from freezing; and
dependability and continuity of the previous requirements.
Depending on the type of fern, the degree of each factor required can vary greatly.
Another factor that is less often recognised is the difference between the conditions needed for a fern to survive, and the conditions it needs to reproduce.
A fern may live quite happily in a relatively hostile environment, but it may not reproduce there. You will only find ferns growing naturally in areas where, at least for some of the time, the conditions suit both survival of the adult plant and reproduction – which means the survival of the gametophyte.
Perhaps more than any other factor, it may be the hardiness of the gametophytes that determines whether a fern will thrive naturally in an area or not.