What is being expressed here is ‘unreal’ meaning, which describes something which is not likely to happen in the future. An alternative way of saying it is simply if a huge quake hit, which you will perhaps recognise as the second conditional.
You might also find if a huge quake were to hit. The difference between this and if a huge quake was to hit is a question of style rather than grammar. Were used in this way has traditionally been called a subjunctive form, but the authors of ‘The Cambridge Grammar of the English Language’ reject this description. They call it ‘irrealis’ were and note that ‘It is an untidy relic of an earlier system, and some speakers usually, if not always, use preterite was instead.’ In brief, if you use were in such contexts, no one will object, but it might make you sound rather formal when you don’t want to. On the other hand, those native speakers who use was offend no rule of English grammar.