Both are straight sixes, not a V6

You E30 had an M20, the five and seven used the M30. M30 is chain driven, M20 used a timing belt. Other than that they're very similar, but I'd say the M30 is better built and more durable (not that the M20 is a bad engine at all!).
A well looked after M30 will do many 100,000s of miles. You want a valve adjustment every 30k miles and a new rotor arm / distributor cap / fuel filter every 100k miles (often neglected which increases fuel consumption and hurts power).
M30 is a legendary engine, wonderful bit of kit. Many US versions run lower compression for use with US low grade fuel, shame. UK/euro versions make a good it more power.