Having cake that contains egg is safer than directly eating a boiled egg actually, since the amount and concentration of egg is low & baking egg makes it less likely to cause allergic reaction. I'd be more worried about the sugar content but small amount should be fine !