This can be a result of an undercooked casserole. If the casserole still “jiggles” when you take it out of the oven, bake it for an additional 10 to 15 minutes. Also, let the custard set and cool down after baking.