What is normally done if there is an underspending of a research grant?
First, you need to plan expenditures to make sure you don't end up with too much money at the end of the project. If you have grants, you're essentially running a small business. It's your job and responsibility to have a budget, plan with and for it, and to track expenditures.

If, however, for reasons that may not have been under your control, you end up with unspent money at the end of the grant period, you can often ask funding agencies to give you an extension of the project. For example, the National Science Foundation pretty regularly provides a one-year no-cost extension on "normal" grants. To get a second year, however, you probably need to have good reasons, or they will take the money back.