The leftovers can be cooled and then frozen for up to 1 month. The beans will have a softer texture after freezing because the process ruptures the cell walls of the plant. The casserole will not be crispy, but more fried onions can be added on top later after reheating.