A reman long block is under $10,000. This is only part of the answer. There is removing and installing. Depending on the boat this could be as low as $2500 and easily $10,000. Then there are all the accessories. Do they need replacement. If you wanted all new, starter, alternator, raw water pump, circulation pump, injection pump, heat exchangers, exhaust, hoses, belts..... We’ll this could easily add up to another $10,000.
So if you killed an engine because you ran it out of oil or sucked a bag and cooked it. You might get away with a $15,000 bill. If you wanted a new everything engine it could cost you $30,000 to $40,000.
So to better answer your question, what do you consider a rebuild.
I have 4500 hrs on my 3208’s and they are 32 years old. I don’t see a rebuild in the future but I have already replaced with new the raw water pumps, alternators, circulation pumps, hoses and belts. I will probably replace the starters soon. In the next 5 years I will probably over haul the injection pumps and the heat exchangers. I doubt I will live long enough to do a long block.