As long as flan is prepared and stored properly, it is safe to eat. However, if it becomes contaminated, it can lead to food poisoning.