If you sit a fully-charged IMR on the shelf, and come back in a coupler years, it will still be fully charged, but it'll have lost significant capacity.
Sitting it on the shelf in a flashlight, though, depends on the flashlight. Some flashlights have a parasitic drain -- a tiny current drawn even when the flashlight is "off", whether it's for mode memory, an electronic clickie, or whatever. With these, you could need to recharge anywhere from once a week to once a year -- all depends on the flashlight.