If a player retires from the league, he no longer receives any NHL compensation. The insurance on player contracts (and not all contracts are insured but typically the top 7) are there to protect NHL teams from the cost since they must continue paying the player and his replacement(s). Due to the high cost of insurance premiums, the league takes out the policy, and each team selects up to a certain number of contracts to insure.
I would be surprised if any player with an existing contract would indeed take the option to retire. Jiri Fischer was deemed medically unable to ever play in the NHL again. The Wings continued to pay him until the contract expired. (Subsequently, he was hired as a director of player development, iirc, but that's outside any consideration here.)