At least 10 years. Typically between 20 and 100 years depending on specifics of the EEPROM or flash used. Higher temperatures reduce retention time.
Nor will the settings reset to default. What happens is the stored data gradually gets degraded and corrupted. It won't just gradually, or instantly return to an erased state any more than a 300 year old piece of paper will gradually, or suddenly become blank. The ink may fade and get spotty but the paper will also develop dark spots. You'll get ones turning to zeroes, zeroes turning to ones as well as invalid states in between.