A multi-million pound legal dispute over coastal erosion has been settled out of court, the BBC has been told.