I believe the biggest risk of underinsuring is when partial damage is done. I have always been careful to slightly over-insure since working in the insurance area of a bank many years ago.
When I recently decreased the amount insured on some IPs because the amounts insured were too high, I asked about underinsurance. The insurance company staffer told me that in the event of a total loss, the payout would be the total insured. Of course, if under-insured, that amount would not cover a rebuild. Anything short comes out of my pocket. I am assuming part of the risk.
She went on to confirm that for partial loss, they use calculations, and for example, if you have insured the place for half its value, and the cost to repair is $100K, then you will possibly be paid $50K at most. Again... anything short comes out of my pocket and I am assuming part of the risk.
I have no idea whether she got that wrong, or if she was right, or if different insurers use different calculations, but the other thing I learned in that phone call was that I didn't need to load up the replacement or rebuild cost to cover demolition and/or architect fees. She said there is a built-in percentage in each policy (at least that insurer) of 15% to cover those costs (or a similar percentage).
For years I had ensured I over-insured rather than be caught underinsured.
With the extreme increases in policy premiums over the past few years, I have changed the policies where I can, increased the excesses and been more realistic with the estimated cost to rebuild.
I changed two policies just last week, saved close to $800 by increasing the excess on each from $300 to $500 and being more realistic with the estimate to replace. It is more difficult to pinpoint a replacement cost with older houses than new, in my opinion.