Preheat the oven to 350°F. Lightly grease a 9-inch square baking pan with cooking spray.
In a medium bowl, whisk together the gluten-free flour, baking powder, salt, nutmeg, cinnamon and cardamom.
In a small bowl, mix together the sour cream and baking soda.
In another small bowl, mix the ingredients for the topping and set aside.
In the bowl of a stand mixer, or using a hand mixer, beat together the butter, granulated sugar and brown sugar until creamy and smooth. Add the vanilla and eggs and mix until combined. Scrape down the sides and bottom of the bowl and mix again.
With the mixer on low speed, add ⅓ of the dry ingredients and mix to combine. Add ½ the sour cream and mix, followed by another ⅓ of the dry ingredients. Repeat with the remaining sour cream and dry ingredients, mixing after each addition. Stir in the nuts.
Spoon half of the batter into the prepared pan. Sprinkle ⅓ of the cinnamon sugar topping over the batter. Spoon the remaining batter into the pan and sprinkle the top with the remaining cinnamon sugar topping.
Bake for 35 to 40 minutes until a toothpick inserted into the center of the cake comes out clean. Let cool for 20-30 minutes before slicing.