Can you eat undercooked cake?
The cake is only slightly undercooked, with a generally golden appearance, and is usually edible. If the cake is clearly undercooked, it typically should not be consumed.

If the cake is only slightly undercooked, with the center slightly moist but without raw batter, and the surface has turned golden, the bacteria within the cake have generally been killed by the high temperature and it is usually safe to eat, with minimal impact on health. However, the texture may be affected and it may not be as fluffy and sweet as a fully baked cake.
If the cake is generally moist and sticky, with a significant amount of uncooked egg mixture or batter inside, has a smell of raw batter, or shows obvious signs of collapse or deformation on the surface, this indicates the cake is undercooked, potentially harboring bacterial growth or insufficiently heated ingredients. In such cases, the cake generally should not be consumed. Eating such a cake may lead to food poisoning or digestive issues, which are detrimental to health.
It is recommended to strictly follow recipe instructions when baking cakes, and pay attention to controlling the oven temperature and baking time. Additionally, it is advisable to consume cakes in moderation and avoid excessive intake.