You don't need shares for this - you can be mortgaged up to the hilt and pass on the house to your heirs when you die, and they sell the house to pay off the mortgage.
But all the money you borrowed needs to have been spent, or it's subject to inheritance tax (or paying back the debt it came from), and all that spending needs to be on things that are taxed with VAT, with employees providing services you buy who are paying income tax, and the businesses you're buying from paying corporation tax, etc etc. Tax is never avoided; it's just paid through other means.
But all the money you borrowed needs to have been spent, or it's subject to inheritance tax (or paying back the debt it came from), and all that spending needs to be on things that are taxed with VAT, with employees providing services you buy who are paying income tax, and the businesses you're buying from paying corporation tax, etc etc. Tax is never avoided; it's just paid through other means.