Preheat your oven to 350°F (175°C). Line an 8×8-inch baking dish with parchment paper or lightly grease with nonstick spray.
In a medium bowl, whisk together flour, cinnamon, baking soda, baking powder, salt, ginger, and nutmeg.
In a separate large bowl, beat butter, sugar, and brown sugar until light and fluffy.
Add eggs and vanilla extract, mixing until just combined.
Gradually mix in the dry ingredients in two batches. Fold in the shredded carrots until evenly distributed.
Pour batter into the prepared pan and smooth the top. Bake for 35–40 minutes, or until a toothpick inserted in the center comes out clean.
Cool in the pan for 5–10 minutes, then transfer to a wire rack to cool completely.