Yes. Always store cakes or cupcakes that have been frosted with cream cheese buttercream in the refrigerator. But, if you want to serve a dessert that's been frosted with cream cheese buttercream at room temperature, it's perfectly safe to leave it at room temperature for 2-3 hours before putting it back in the refrigerator.