Preheat your oven to 350°F (175°C) and prepare an 8x8-inch baking pan by lining it with heavy-duty non-stick aluminum foil. Lightly coat the foil with cooking spray.
In a large microwave-safe bowl, melt ½ cup of unsalted butter for about 1 minute, then allow it to cool slightly.
Whisk together one large egg, 1 cup of light brown sugar, ½ teaspoon of kosher salt, and 1 teaspoon of vanilla extract until the mixture is well combined.
Sift in 1 cup of all-purpose flour, ½ teaspoon of baking powder, 1 teaspoon of ground cinnamon, and ½ teaspoon of ground nutmeg, then gently stir to combine.
Fold in 1 cup of freshly grated carrots until they are evenly mixed into the batter.
In a separate bowl, beat 4 ounces of softened cream cheese with one egg yolk and ½ cup of granulated sugar until the mixture is smooth.
Pour the carrot cake batter into the prepared baking pan and swirl the cream cheese mixture over the top for a marbled effect.
Bake in the preheated oven for 25 to 30 minutes, or until a toothpick inserted in the center comes out clean.
Once baked, allow the bars to cool at room temperature for at least 2 hours before lifting them from the pan and slicing into squares.