Summary/Conclusion
Sadly, any way you slice it, doing the main and bonus goals result in a net loss of coins
Best-case scenario, you're out at least
-12,410 coins (not factoring in the cost of your floor decoration; after completing the bonus goal and mastering all goal recipes; and assuming you didn't have to buy an extra bonus goal appliance). Worst case scenario, you're out
-481,340 coins (not factoring in the cost of your floor decoration; after completing the bonus goal cooking only as much as necessary; and assuming you didn't buy any extra appliances).
Main takeaway:
if you're going into a 14-day goal with the intention of completing it, try to have at least 500,000 coins on hand; and be prepared to cook recipes outside of the goal to keep your coin balance up.
What About 5-Day Goals and Side Goals?
Generally speaking: because Side Goal requirements are usually on basic appliances (which most people already have, or are otherwise relatively cheap to purchase), side goals are usually fairly profitable and can help bolster your coin balance/offset the main goal cost if you choose to do them. Because they don't ask you to purchase anything, they won't result in a coin loss unless you buy a truly significant number of appliances for them. However, it's on a case-by-case basis whether a side goal would be actually profitable enough to cover the losses from the main and bonus goals.
5-Day goals, unfortunately, are so variable that it's difficult to get an analysis down
Between the new recipes being added to appliances at varying price points, and the existing recipes you are asked to cook also frequently changing, the profitability really varies on a goal-by-goal basis. They are generally profitable as they only ask for the purchase of one (1) extra appliance, but exactly how profitable depends on the appliance cost and what recipes are asked to be cooked.