With Gnomes, they have Warlocks and Mages playable, with Wilfred Fizzlebang, Nibby the Allmighty and especially Millhouse Manastorm probably being more well known and iconic gnomish characters than Mekkatorque, who was basically non existent until a small cameo at the broken shore cinematic and had no storyline ingame up until BFA, if we don't include the shortlived Gnomeragan event. Back when I started playing the game, Gnomes in the actual game where commonly depicted as Mages or Warlocks, yet they still weren't popular. When I think about other Gnome Characters I noticed more during my 13 years of playing the game up until BFA I would say Kelsey Steelspark, who is a rogue, Narain Soothfancy who seems to be a mage or Linken, a Warrior.
Mekkatorque may be currently the most well known gnome character, but this is a recent phenomena. Again, up until Legion he was basically just an NPC in Ironforge standing around randomly and doing nothing inside the entire story and even in Legion, he just had a short appereance in a cinematic centered around Varian Wrynn. It wasn't until BFA where he became more prominent. So your argument on Gnomes falls fully apart. Mekkatorque isn't in the game long enough to explain the lack of Gnome characters with them being unable to ride a Mech just like him. Especially since outside of Gnomeragan, Gnomes riding Mechs wasn't that much of a thing. It was more of a prominent Goblin thing, who though also had plenty of representation as pirates, putting them into a similar position as Night Elves in that one of two of their iconic classes are playable.