Generally, it is safe to leave any cake with cream cheese frosting at room temperature for up to 2 hours. You should not leave it out overnight as the frosting may spoil.