No, you should not leave a cooked corn casserole out overnight. It may only sit out for about 2 hours, after which it should be stored in the refrigerator. For more long term storage, it is safe to freeze corn casserole for 2-3 months.