Preheat the oven to 325°F (163°C) and grease a 9-inch springform pan, lining the bottom with parchment paper.
Make the Carrot Cake Layer:
In a medium bowl, whisk together flour, baking powder, baking soda, cinnamon, nutmeg, and salt.
In a separate bowl, beat together the granulated sugar, brown sugar, and oil until smooth. Add eggs, one at a time, and mix well. Stir in vanilla and grated carrots.
Slowly fold in the dry ingredients and mix until just combined. Add walnuts if using.
Make the Cheesecake Layer:
Beat the cream cheese until smooth and creamy. Add sugar and vanilla, mixing until combined. Add eggs one at a time, mixing well after each addition. Stir in sour cream until smooth.
Assemble: Pour the carrot cake batter into the prepared pan, smoothing it out. Gently pour the cheesecake batter over the carrot cake layer.
Bake for 60-70 minutes, or until the cheesecake is set but still slightly wobbly in the center.
Cool for 10 minutes in the pan. Run a knife around the edges, then cool to room temperature. Refrigerate for at least 4 hours, or overnight.
Serve chilled, topped with whipped cream or extra walnuts, if desired.