I'd go along with the advice to stay away from Lehmans but not because parts are expensive or hard to get. Considering the age of these engines parts are actually very easy to get and the prices of the stuff we've had to buy for our FL120s over the years seem quite reasonable to me.
An engine to stay away from because of parts price and availability are Volvos although they are very good engines.
Most of the diesels in the kinds of boats those of us on this forum have are marinzed vehicular, industrial, or agricultural engines. As such, the base engines were very well proven by the time someone got around to marinzing them. John Deere, Cummins, Cat, Lugger (some of which are based on John Deere engines), Perkins, and Ford (of England) are all engines with a good track record on land. So assuming proper operation, servicing, and maintenance threre's no reason to expect the engines to be any less effective on water.
An engine I would be leery of just because it was not used by very many builders and so may have a parts and service issue at least in the US, is BMW. They were used in one of our favorite boats, the Lord Nelson Victory Tug. We were seriously considering one of these at one point but the turn-off for me was its BMW engine. Later Victory Tugs have Cummins engines but at the time these boats were still pretty new and so werel considerably more than we wanted to spend on a boat.
A lot of Baylners have Hino engines, which is a marinzed version of a Japanese diesel, I think perhaps Nissan but I could be wrong on that. I don't know of any other production boats in the US that used them but Bayliner used a LOT of them and so far as I have heard they are good engines. Don't know about parts availability or prices these days but it must be okay considering the number of Bayliners out and about with these engines..
Yanmars are popular around the world and parts and service are both readily available pretty much everywhere one would be boating on the planet.
The two-cycle Detroit engines, particularly the 6-71 and 8V-71, were used in a lot of cruisers from the 1940s on through the 1970s and maybe even into the 80s. First number is the number of cylinders, second number is the displacement of each cylinder. They are relative simple engines which translates into very high reliability. More so even than recreational boats Detroits have been used in landing craft, Navy launches, tugs, commercial fishing boats--- the list goes on. With at least a reasonable level of service and maintenance Detroits are kind of like the Energizer Bunny.
The downside of a Detroit is the noise and the fuel consumption, both of which are tied to the two-cycle nature of the engine. There are ways to reduce the noise. The fuel consumption is what it is.
I can only think of one marine diesel that is considered by pretty much everyone who comes in contact with it to be a piece of crap and that is a marinized version of a GM V-8. I don't remember the displacement but the land version was bad, too. It was an existing gas engine design that was adapted for diesel use in cars in (I think) the 1980s when diesel enjoyed a brief surge of interest in the US due to rising gas prices. GM put the engine in Cadillacs and some other models where it quickly earned a reputation of being rubbish in terms of reliability. The marinized version is no better. So stay away from that one.
With the rest of the makes, the way the engine has been operated and cared for by previous owners is WAY more important than the name on the builder's plate or even the number of hours on the Hobbs meter. In my opinion, I would rather buy a boat with engines with 6,000 hours on them and a history of being properly run and maintained than a boat with 2000 hours on the engines but a history of hard or abusive running and poor service and maintenance.
With the possible exception of the BMW and GM diesels, I suspect all the other makes I've mentioned are owned by at least some members of this forum. So they can chime in with specific opinions or experiences with them. The only engine of the bunch I have had direct experience with is the Ford Lehman 120 but I've always been interested in engines so have tried to learn at least something about many of them.