First of all the valve seal problem is not related to this engine. I believe the '92 has the M104 engine. This engine is known for blowing head gaskets, not having the poor valve seals.
It's very likely that it needs a headgasket, but the problem may not stop there. If the head is warped it must be straightened. Unlike a pushrod engine head, you can't simply mill it flat and slap it back on. If the head warps, it will misalign the camshaft bores, this means straightening the head, or buying a new or straight casting. MB does not recommend straightening this head, probably because they enjoy so much selling you a new one for nearly $2,000.
Unless this car is at an absolutely bargain basement price, I would look for one in better condition. These cars are quite plentiful, and you can find one that has been well cared for and garaged all it's life.
The good news is that if you do decide to have headwork done, it's an operation that most of the dealer techs do alot. So if they do it alot, they're most likely quite good at it.
My personal thoughts are, even though I would enjoy the added power of the two cam motor, I would prefer an M103 engine. The valve seals have been updated on most of them by now, and they seem to be more trouble free. If it does come down to a head removal and replacement on an M103 engine, it's not too tough.
Best of luck,
'01 C Class, Six Speed
'84 Euro 240D, manual, 533K miles
'88 300E 5 Speed
'81 300D Daughter's Car
Over 800,000 miles in