If you're buying a boat with an engine inside, it will depend on how well it';s been looked after. The 2010 is not a current Volvo engine replaced by the D1-13.
I replied a Volvo MD1B (another discontinued engine) with a Yanmar 1GM10. Spares are still available and the engine is still supported by Yanmar.
If you want a raw water engine, I'd definitely go with the 1GM10, but I've lived with one for over 15 years and although it still has a capacity to surprise me, it's a really simple engine. Be wary of spare prices, however, while many are reasonable, some things are eyewateringly expensive (like the Hitachi alternator).
If you want a FW cooled engine, then probably your going to look at the Volvo 2010, but if it's re-engining you're planning, then there are cheaper options that are just as good.
Fundamentally the reliability should be no different - it all depends on how well they are used and looked after. The Yanmar is a much simpler and less sophisticated engine and if not properly installed and maintained, particularly the seawater cooling system and the exhaust elbow can suffer from expensive failure of the cylinder head. There are also weak points related to the water pump and the oil pipe underneath.
The Volvo is a much newer Perkins design, 2 cylinder, freshwater cooled. It will probably be quieter and smoother, has a bigger alternator, easier to fit a calorifier and generally more sophisticated. Still needs regular maintenance of the cooling system and exhaust elbow.
Since it sounds like you're looking at used engines (Volvo 2010 now superseded) I'd go with the Yanmar if all you want is something to push the boat. As said above though, the Volvo will be quieter smoother, and a little more capable.