If the food contains fruit (dried fruit and preserves are excepted), eggs, cream cheese, whipped cream or cream, they should be refrigerated. This includes pumpkin pie, berry cobbler, cakes with real cream cheese frosting, meringue and cream pies.
Yes, I know. Storing baked goods in the refrigerator can make the crusts soggy. This is good reason for eating your baked goods quickly! Your pie crusts will fare better in the refrigerator if prepared in certain ways, 1) seal the crust with egg or butter before baking, 2) Begin baking at 425°, then drop the temperature.
Specific storage varies a bit by ingredient, so if you want the nitty gritty, here you go:
Pumpkin Pie/Custards Pumpkin pie and other custards must be refrigerated. They will keep up to 2 days, do not freeze.[ref]http://www.pillsburybaking.com/bakers-corner/baking-tips/all-about-pie-crusts/pie-storage[/ref]
“Custard-style pies are prepared with eggs and milk, ingredients that have a high moisture content, and when stored at room temperature attract bacterial growth, the food scientist said.”[ref]Custard-style pies are prepared with eggs and milk, ingredients that have a high moisture content, and when stored at room temperature attract bacterial growth, the food scientist said.[/ref]
Cream pies should be allowed to cool then refrigerated for at least 3 hours before serving. They should be stored in the refrigerator immediately for up to 2 days. A good tip to keep the top from getting ruined in storage is to insert a toothpick in the center to elevate the plastic off the top, then loosely cover with plastic wrap or shower cap. [ref]http://www.bhg.com/recipes/desserts/pies/storing-and-serving-cream-pies/[/ref]
Apple and other fruit pies
Fruit pies can be stored on the shelf (up to 70°, in warmer climates should always be refrigerated) for up to 2 days, but need to be refrigerated thereafter. Cover with tin foil or wax paper instead of plastic to keep moisture for spoiling the crust. Can be frozen for 6-8 months[ref]http://www.stilltasty.com/fooditems/index/16376[/ref]
Cakes with whipped cream or cream cheese frosting or cream fillings must be refrigerated. Also, cakes with high moisture ingredients like fruits or carrot should be refrigerated as spoil they more quickly. Other cakes are fine to be stored at room temperature for several days (I know, they do have eggs, but they don’t have tons of eggs!). Once sliced a cake begins to dry out so cover the sliced area with plastic wrap to seal in the moisture. In warmer climates (above 70° room temperature) it is best to refrigerate. To store, cover sliced area in plastic and loosely cover the entire cake in an inverted bowl, cake cover or foil and refrigerate. [ref]http://www.bettycrocker.com/tips/tipslibrary/baking-tips/cake-making-101[/ref][ref]http://www.thekitchn.com/expert-advice-how-to-wrap-stor-151924[/ref]
Cobblers and crisps can be refrigerated and will keep for a few days. While in most cases cobblers can be safely stored at room temperature for up to 3 days as the fruit acid and sugar fend off bacteria (up to 70°, in warmer climates should always be refrigerated), they tend to mold quickly. As a rule of thumb I always just refrigerate them and they are fine for several days.[ref]http://www.krusteaz.com/tips-and-techniques#!cobblers-and-crisps[/ref]
Cookies and bars should be sealed in air tight containers and stored at room temperature to be kept fresh. Crisp cookies and soft cookies should be stored separately. Cookies with cream cheese frosting should be refrigerated. Cookies can be successfully frozen for several months.[ref]http://www.wikihow.com/Keep-Cookies-Fresh[/ref]
If you are wondering about pies kept on the shelf at the grocery store, those are formulated with preservatives to allow them to be shelf stable without refrigeration. A very good reason to bake your own!
Lynne’s Country Kitchen has a good article on freezing pies and pie shells
Martha Stewart has a nice gallery on cookie storage and packaging
TLC has a nice guide on Cake Storage