Edit: Forgive the typo in my question, I’m still curious though :)
Edit: See /u/sunagainstgold's excellent point below. To clarify what I mean by 'remained common in the Middle Ages': it is something like: a) it was a theory frequently expressed in contemporary 'scientific' writings, both among proto-university figures in the twelfth century and by arts and theology masters in the later middle ages and b) it is present in 'widely available' (with all the qualifications that demands) compendia (two examples to hand are: Isidore, Etymologies, 14.1.2-3 and John Trevisa's middle english translation of Bartholomaeus Anglicus's De proprietatibus rerum, 14.2 (pg. 693 in the Oxford edition)).
Classical and medieval authors absolutely considered earthquakes a scientific phenomenon. Their cause had been considered as far back as the presocratics, who came up with various theories, but subsequent views on the matter were largely shaped by the influential treatment of the matter in book 2 of Aristotle's Meteorology (which you can read here, from Part 7). Aristotle first offers various reasons to doubt previous views which attributed earthquakes to an excess of either water or heat, either causing the earth to become bloated or brittle and in either case rupturing as a result. Instead, he suggests, we should consider the air the main cause of earthquakes, since it is the most violent and volatile of the elements. In particular, he thinks that earthquakes are caused by the air rushing into or out of the earth. Naturally there are further considerations. For example, given that earthquakes are not equally common everywhere, the geology of a region is presented as another factor. So regions with more porous terrain are more likely to have water and air captured underground:
The severest earthquakes take place where the sea is full of currents or the earth spongy and cavernous: so they occur near the Hellespont and in Achaea and Sicily, and those parts of Euboea which correspond to our description-where the sea is supposed to flow in channels below the earth. The hot springs, too, near Aedepsus are due to a cause of this kind. It is the confined character of these places that makes them so liable to earthquakes. A great and therefore violent wind is developed, which would naturally blow away from the earth: but the onrush of the sea in a great mass thrusts it back into the earth. The countries that are spongy below the surface are exposed to earthquakes because they have room for so much wind. (2.8, trans. Webster)
The remainder of the section is spent dealing with various essentially folk beliefs about the causes of earthquakes, explaining how the other apparent causes of earthquakes are better explained by his theory.
By the Roman period, this had been somewhat refined into the more specific notion that the earth essentially porous, allowing the air in and out of underground caverns. But if, for whatever reason, there was an excessive buildup of pressure in these caverns or if the air rushed too quick through them, they could shudder or burst, causing earthquakes. Seneca, who devotes an entire chapter of his Natural Questions to earthquakes, provides a nice explanation of how this is supposed to work:
When moving air with great force completely fills an empty space under the earth and proceeds to struggle and think about a way out it repeatedly strikes the side-walls within which it lurks, over which cities are sometimes situated. These “walls” are sometimes so shaken that buildings placed above them fall down, sometimes to such an extent that the walls which support the whole covering of the cave fall into the vacant space underground and entire cities collapse into the immense depths. (6.25, trans. Corcoran)
This sort of thing was a well known as a literary device, Seneca cites Virgil a number of times, explaining that he supports Aristotle's opinion about earthquakes. Similarly Lucan, in his Phrasalia, compares the trembling of the earth caused by Caesar's siege tower to an earthquake by saying: 'When this huge mass swayed, the soldiery believed a wind had struck the hollow caverns of the earth in its quest to burst out and they marvelled that their walls were standing.' (4.459-61, trans. Braund)
This theory of the movement of the air in subterranean caverns causing earthquakes remained common through the Middle Ages. To provide just one example, in his Natural Questions, Adelard of Bath (c.1080-1152), likely drawing at least from Seneca (which we know was in circulation in Normandy at this time), explains essentially the same theory. The text is written as a dialogue between Adelard and his nephew, who quizzes him about various natural phenomena:
Nephew: There is something else which I am more surprised about: namely, how so much strength, so much force is laid up in wind, that it can throw down houses, pull even forests up by their roots...
Adelard: The cause of such a harmful movement is both the rushing swiftness and the thickness of the wind. For imagine a fair amount of wind compressed in the bowels of the earth and for a long space of time unable to find an exit. When at length – whether by its own strength because its matter is more abundant, or by the very condition of the earth which provides a way for it – it finds a means of breaking out, the longer it has been enclosed, the more violently it rushes out. If the air is also corpulent and thick because of increased moisture, when its corpulence is mixed with swiftness, this gives rise to a hitting power. Thus, wherever it blows, it causes harm in relation to its strength. It should not, then, seem surprising that, in attempting to break out of the earth, it forces it to rock, if after breaking out it destroys things in its way. (63, trans. Burnett)
In Japan in particular, where earthquakes are not uncommon, during the Edo era (and even earlier, as documented by the Nihon Shoki, one of the oldest written books on Japanese history finished in the year 720) many people thought that earthquakes and other natural disasters such as floods were caused by giant catfish flailing around. Even the Lord Hideyoshi Toyotomi, upon building his Fushimi Castle in Kyoto in 1520, wrote to his retainer to "build a foundation that would withstand the quakes caused by a giant catfish."
A catfish seems like an odd choice of animal that would cause something as devastating as an earthquake. Originally it was thought to be a dragon that was sprawled out under the islands which woke up periodically to move about, but over the years it became more common to refer to it as a giant catfish.
There are many theories about why this is, but the more you study these fish, the more it makes sense -- their association with the earth, since they prefer to live in muddy water, along with their massive size. But most of all what they are known for is their sensitivity to electric stimuli or the minute vibrations from a coming quake which makes them more active than usual. Many people still believe that this makes them good indicators if there is an earthquake about to hit, but studies have been inconclusive.
There are two "keystones" buried into the ground in Kashima shrine in Ibaragi prefecture and also the Katori shrine in Chiba prefecture (both dating back to the 700s), said to have been placed by the sword god Takemikazuchi to hold down the head and tail of the giant catfish buried in the earth. Because earthquakes were so feared as being one of the most common and destructive natural phenomenon in Japan, personifying it as a living creature that could be at times controlled made sense for the people of that time. To this day, "disaster amulets" are sold at the shrine and many others like it, in an attempt to be protected from earthquakes.
/u/qed1 gave a really nice answer from the educated elite perspective. But I think it's important to keep in mind how limited access to natural philosophy/proto-scientific literature was in the Middle Ages.
Hildegard of Bingen was incredibly learned, for example (just not formally or systemically). In Scivias 3.18, she talks about the "movement of the earth" as a result of strong blasts from the four winds interacting with each other and sending out whirlwinds to shake the ground.
More fun and perhaps more relevant is Konrad of Megenberg writing in the 14th century. He specifically says that most people have no idea what's going on (of course he does, and will "tell the truth"). But he does give a couple examples of local folktales. One he labels an old wives' tale: the earth is carried on the back of a fish named Celebrant, who carries its tail in its mouth. When it rocks back and forth or turns upside down, the earth shakes.
Konrad attributes a similar legend to the local Jewish population (I think that's what he means by "juden mär"), except with an ox named Vehemot.
(His Buch der Natur is online, if you should fancy some Middle High German over your lunch break).
Those examples aren't comprehensive, of course. And Konrad will go on to tell "the truth" as a version of Aristotle's theory, tossing in some astrology for good measure. But we have to recognize that what a handful of literate upper-class men read about cannot be universalized as "remained common in the Middle Ages."