From experience, what you mention is part of the perverse effects of the bid mechanisms, but these have nothing to do with the initial underestimation and is comparatively minor in relevance.
Something is designed (years time), then it is estimated (often wrongly, however it takes some time as well), then it is approved/funded (some more years).
But, IF the design was valid AND the estimation was correct at the most you could adjust the total amount by inflation/increases of prices.
So, pure theory, you calculate a cost of 100 units (million dollars, whatever), then, since a few years have passed you should add (say) 10% for inflation/price adjustment before proceeding to a public bid (but it is extremely rare that this is actually done).
The construction firms/contractors will offer between 15% and 25% rebate, if the bid is (as often is) given at max rebate, the one with 25% rebate will get the job.
Now, assuming that the estimation is perfectly accurate (it isn't at all) the winner is (on the first day) under for at least 20%, 10% (the price adjustment, if included) and another 10% (their profit), while the remaining 5% is debatable, in the sense that it is what is actually possible that one construction company can save when compared to another for a number of reasons (machinery, organization, whatever).
So, from day one the winner has two possible ways out, the first is to actually optimize the work to recover this 20-25% (difficult) the second is to find errors in the project (relatively easy).
But, once the project is analyzed, what is found is not just the "missing" 20 to 25% (which if spent would not make the project over budget) but more likely something like 100%.
So, at the end of the day, you are going to spend 175 instead of 100, of which 15 is connected to the perversions of the bidding, but 60 is errors in the project or in its estimation.