Prep the pan and oven. Preheat the oven to 350°F (175°C). Line an 8x8-inch baking pan with parchment paper, leaving overhang on two sides, and lightly grease the parchment.
Mix the wet ingredients. In a medium bowl whisk together the melted butter, brown sugar, whole egg, and 1 teaspoon vanilla extract until smooth and glossy.
Combine the dry ingredients. In a separate bowl stir the flour, cinnamon, nutmeg, baking powder, and salt until evenly mixed.
Make the batter. Gently fold the dry mixture into the wet mixture just until no dry streaks remain. Fold in the freshly grated carrots until evenly distributed.
Spread in the pan. Scrape the carrot cake batter into the prepared pan and smooth it into an even layer with a spatula.
Prepare the cream cheese swirl. In a clean bowl beat the softened cream cheese, egg yolk, granulated sugar, and remaining 1 teaspoon vanilla extract until smooth and slightly fluffy.
Swirl the topping. Spoon the cream cheese mixture over the batter in dollops, then drag a knife or skewer through both layers to create loose swirls.
Bake the bars. Bake for 25–30 minutes, or until the edges are lightly golden and a toothpick inserted near the center comes out with just a few moist crumbs.
Cool and slice. Let the pan cool completely on a wire rack, at least 2 hours, then lift the slab out using the parchment and slice into 16 bars.