No, it's not quite right. There's no real logic here, just tradition, common usage, and colocation.
The colocation is with the word "storm," "the storm raged." By extension, anything that is a kind of "storm" can rage. Typhoons rage, hurricanes rage, gales rage, blizzards rage, and tempests rage. (But thunderstorms do not "rage."). "Raging" is usually used for something involving wind, for a long period of time, with many periods of violence. We also use "rage" with wind-driven water: raging waves, a raging surf.
A single earthquake only lasts for minutes. It doesn't fit because it's not a storm, doesn't involve wind, and isn't sustained.
To refer to a period of days, including foreshocks and aftershocks, we can simply use the plural, "earthquakes."
We can say "Earthquakes shook the region for two days."
We can also use the word "ravaged, which is transitive verb meaning "destroyed by violence." An earthquake cannot just ravage, it has to ravage something. "In 2010, earthquakes ravaged Haiti for almost a week."