If a pile is driven or bored to a depth greater or less than that predicted, it is essential that the technical reason(s) for this is/are understood. For example, the assumptions used in pile design may be wrong, or the construction process may be flawed. If only one pile is affected, then you MUST ask yourself why no other pile was affected, and you MUST be sure of your answer. If you do not already have a geotechnical engineer on board, you should consult one without delay.
If YOU have designed the pile length, then the client (or you?) pays for additional length. In the UK and Ireland, it is common for such work to be paid, at least in part, per unit length.
If the piling contractor has designed the piles, and the actual lengths prove to be (for example) beyond the reach of normal equipment, the question of the foreseeability of the conditions encountered really comes into play. More detailed advice would have to be based on a knowledge of the particular Conditions of Contract you are using.
The risk sharing may not be very clear if YOU have designed the piles. You must make it clear to your client from the outset what risks HE carries, and he needs to set aside a reasonable contingency sum to cover those risks. (But don't let the contractor know the money is there or how much it is, or he may make every effort to obtain this money, even if conditions are ideal.) If you haven't made it clear to your client what risk he carries, he may want to recover such extra costs from you.
Yes, a geotechnical engineer needs to know about contract as well as about geotechnics and many other areas.