Prep the pan and oven: Heat the oven to 350°F (175°C). Grease and line a 9-inch square baking pan with parchment, leaving a little overhang for easy lifting.
Make the streusel: Stir flour, brown sugar, cinnamon, and salt.
Add melted butter and mix until clumps form. Fold in nuts if using. Set aside.
Make the cream cheese filling: In a small bowl, beat cream cheese, sugar, egg, vanilla, and a pinch of salt until smooth and creamy.
No lumps if you can help it.
Whisk dry cake ingredients: In a medium bowl, whisk flour, baking powder, baking soda, salt, cinnamon, nutmeg, ginger, and cloves.
Mix wet cake ingredients: In a large bowl, whisk granulated sugar, brown sugar, and oil until combined. Add eggs, pumpkin puree, sour cream, and vanilla. Whisk until smooth.
Combine batter: Add the dry ingredients to the wet.
Stir gently with a spatula until just combined. Do not overmix.
Assemble: Spread about half of the pumpkin batter into the pan. Smooth the top.
Gently spread the cream cheese filling over it. Dollop the remaining batter on top and carefully spread to cover the filling. Sprinkle the streusel evenly over the surface.
Bake: Bake for 38–45 minutes, or until the center is set and a toothpick inserted into the cake (not the cream cheese layer) comes out with a few moist crumbs.
The edges should be lightly golden.
Cool: Let the cake cool in the pan for at least 30 minutes, then lift it out using the parchment and cool to room temperature before slicing. The cream cheese sets as it cools.
Serve: Slice into squares. Enjoy warm or at room temp.
A light dusting of powdered sugar is a nice touch.