Preheat oven to 350°F (175°C). Grease a 9x13-inch baking pan.
In a bowl, whisk together flour, baking powder, baking soda, cinnamon, nutmeg, and salt.
In another bowl, beat eggs, granulated sugar, brown sugar, oil, and vanilla until smooth.
Gradually mix dry ingredients into wet ingredients until just combined.
Fold in grated carrots and nuts (if using).
Pour batter into the prepared pan and spread evenly.
Bake for 30-35 mins or until a toothpick comes out clean.
Let cool completely before frosting.
Beat cream cheese and butter until smooth.
Add powdered sugar and vanilla, mixing until creamy.
Spread over cooled cake.