In most cases, you aren't likely to get sick. Cake typically has a high sugar content and low moisture content, both qualities that make it resistant to mold and bacteria growth.  However, if the cake has fresh ingredients that have spoiled, it can potentially cause food poisoning and lead to symptoms such as stomach pain, nausea, and diarrhea.