Mecha Sonic and Metal Sonic differ in both appearance and power. Metal Sonic is roughly the same size as Sonic and isn't quite as strong, while Mecha Sonic is a more powerful, upgraded form.
Think of it as a fusion of Metal Sonic's various iterations layered together, resulting in the stronger Mecha Sonic. So while they share a mechanical lineage, Mecha is essentially Metal Sonic turned up several notches.