Preheat oven to 350°F. Grease a 9-inch round or 9×9-inch square pan and line the bottom with parchment paper.
Whisk flour, baking powder, baking soda, cinnamon, nutmeg, ginger, and salt together in a medium bowl.
In a large bowl, whisk eggs, both sugars, oil, Greek yogurt, and vanilla until smooth.
Add dry ingredients to wet; stir gently until just combined. Fold in grated carrots and nuts.
Pour into prepared pan and bake 30–35 minutes until a toothpick comes out clean. Cool in pan 15 minutes, then turn out and cool completely on a wire rack.
Beat softened cream cheese and butter on high speed for 2–3 minutes until pale and fluffy. Add vanilla, lemon juice, and salt. Add powdered sugar gradually and beat until smooth.
Frost the completely cooled cake. Top with chopped walnuts and a dusting of cinnamon if desired.