Preheat the Oven:
Preheat your oven to 350°F (175°C). Grease and flour two 9-inch round cake pans or one 9x13-inch baking dish.
Mix the Dry Ingredients:
In a medium bowl, whisk together the flour, baking powder, baking soda, cinnamon, ginger, nutmeg, cloves, and salt.
Mix the Wet Ingredients:
In a large bowl, whisk together the granulated sugar, brown sugar, and oil until combined.
Add the pumpkin puree and mix well.
Beat in the eggs one at a time, followed by the vanilla extract.
Combine Wet and Dry Ingredients:
Gradually add the dry ingredients to the wet mixture, mixing until just combined. Be careful not to overmix the batter.
Bake the Cake:
Pour the batter evenly into the prepared cake pans (or baking dish) and smooth the tops.
Bake for 30–35 minutes (if using round pans) or 35–40 minutes (if using a 9x13 dish), or until a toothpick inserted into the center comes out clean.
Cool the Cake:
Allow the cakes to cool in the pans for about 10 minutes, then carefully invert them onto a wire rack to cool completely.
Make the Cream Cheese Frosting (Optional):
In a medium bowl, beat the softened cream cheese and butter together until smooth and creamy.
Gradually add the powdered sugar and vanilla extract, mixing until well combined.
Add milk as needed to reach your desired consistency.
Frost the Cake:
Once the cake layers have cooled completely, spread the cream cheese frosting between the layers (if using round pans) and on top and sides of the cake.
If using a 9x13 dish, simply frost the top of the cake.