The Attack stat is a stat which determines the power of a physical move. Basically, the higher your Attack stat, the more damage your Moves will cause. STAB has no relationship with the Attack stat because this occurs with all Types. The same goes for the Special Attack stat. So in your example, Steelix's Earthquake causes more damage the higher it's Attack stat is, not how it compares to the STAB boost.
Hope you understood this :)