I'd cooked 4 meals on Wednesday and left two for today, failing to take into account the fast. I'm not sure whether the meals will be safe to eat tomorrow. Which would be a greater sin - to eat them, or to let them become spoiled?
Regarding whether the Church can impose fasting as a matter of precept, St. Thomas Aquinas writes (Summa Theologica II-II q. 147 a. 3 ad 2):
It will be a mortal sin to disobey a commandment through contempt of the lawgiver's authority, or to disobey it in such a way as to frustrate the end intended by him: but it is not a mortal sin if one fails to keep a commandment, when there is a reasonable motive, and especially if the lawgiver would not insist on its observance if he were present. Hence it is that not all, who do not keep the fasts of the Church, sin mortally.
If there is no way (which is very unlikely) to preserve the food (e.g., by refrigerating, canning, fermenting, salting, etc.) or feed it to animals—and since letting food go to waste would be a sin of wastefulness, which is against justice—it may be a "reasonable motive" to consume it immediately.
Jesus said :
Not that which goeth into the mouth defileth a man; but that which cometh out of the mouth, this defileth a man. [Matthew 15:11 KJV]
Even if you were to keep the food and it spoiled and people ate it and vomited, no sin is involved. It is decidedly unhealthy to risk food poisoning and no sane person would recommend it (certainly not I) but it is not sin. It does not defile, as Jesus makes clear.
Why not do as Jesus suggests and invite those who have no food or little food to eat ? I work with the homeless in Gloucester at the homeless hostels and I know that there is always someone close by who could do with a good meal.
But when thou makest a feast, call the poor, the maimed, the lame, the blind: And thou shalt be blessed; for they cannot recompense thee: for thou shalt be recompensed at the resurrection of the just. [Luke 14:13 KJV]