Preheat your oven to 350°F (175°C). Grease an 8-inch square baking dish or line it with parchment paper for easier removal.
In a large mixing bowl, whisk together the melted butter and brown sugar until well combined. Add the egg, vanilla extract, cinnamon, ground ginger, allspice, and ground cloves. Whisk until smooth and creamy.
In another bowl, sift together the all-purpose flour and kosher salt. Gradually add the flour mixture to the wet ingredients, stirring gently until just combined. Be careful not to overmix!
Gently fold in the grated carrots until they are evenly distributed throughout the batter.
In a separate bowl, beat the softened cream cheese with the granulated sugar and egg yolk until smooth and creamy.
Pour half of the carrot cake batter into the prepared baking dish, spreading it evenly. Spoon dollops of the cream cheese mixture over the batter, then carefully spread the remaining carrot cake batter on top. Use a knife or spatula to swirl the cream cheese layer slightly into the batter for a marbled effect.
Bake in the preheated oven for 25-30 minutes or until a toothpick inserted into the center comes out clean. The edges should be slightly golden, and the center should be set.
Allow the bars to cool in the pan for about 10 minutes before transferring them to a wire rack to cool completely. Once cooled, cut into squares and enjoy!