Say I'll want to brew an imperial stout, let it ferment in primary and then rack it to secondary. How important is the temperature in secondary? I have a temperature controlled fridge to hold the fermentation temperature in primary. I need to make space in the fridge and can't have it there for 3 more months. I have the option to put it into a cooling house (like 5 degrees celsius) or into the quiet warm cellar. Is this an issue?
If your secondary is purely for maturation and off the yeast cake, then I would say the temperature you store bottled beers at is reasonable ie any ambient room temperature.
At warmer temperatures, different maturation flavour will develop at different rates but if you are leaving it for 3 months then I wouldn't worry about it. I have left Imperial Milds and Stouts in the FV for 2 months then bottled up and left for a year plus at wildly fluctuating cellar/room temps 12-30C; the beer came out delicious from month 2 to still now 2 years later.
Based on your additional comments. This answer addresses aging beer and temperature.
It really depends on your vessel you age in. Specifically if you can maintain zero oxygen and if the beer is carbonated.
If it's a fermenter with an air-lock I recommend keeping it below 40°F, because airlocks can go dry or fail exposing it to oxygen and allowing otherwise dormant microbes to grow. Lower temp will buy you time to correct issues before they effect the beer.
If you bottle or keg, room or cellar temps are fine. If kegging I recommend carbonating before aging and check weekly to insure its maintaining pressure.
Beers age more quickly as temperature increases. We've "hot" aged beers for just a few weeks in summer temps (90°+F), and they come out as refined as a 6 month cellar beer. (Kegged, carbonated and completely oxygen free)