This is a story. Mr. F. bought a building to open a restaurant, but he found the toilet had some problems. So he came to dig a trench to find the sewage pipe and predicated the job would take about a week only to find an Messapians' tomb. But he did not realize its history. I did not understand the meaning of this sentence.
...he came to dig a trench to find the sewage pipe and predicated the job would take about a week - only to find a Messapian tomb.
I had to read the sentence several times before I realised that the job would not "take a week only": "Only to find an ancient tomb" suggests that it was a great surprise. They had not been expecting to find the tomb.
When the trench was being dug, an ancient tomb was uncovered. I would assume that the work was delayed while archaeologists examined the site, so that in the end the excavations took considerably longer than a week.
If this history only later became clear, what was immediately obvious was that finding the pipe would be a much bigger project than Mr. Faggiano had anticipated.
If this history only later became clear, what was immediately obvious was...
In other words, Although this history only became clear later on, it was immediately obvious that...
When the tombs were found, it was immediately obvious that finding the damaged pipe would be a much bigger project than Mr Faggiano, the owner of the restaurant, had expected.