Preheat your oven to 350°F (175°C) and line an 8x8-inch baking dish with parchment paper, leaving some overhang for easy removal.
In a large bowl, combine the rolled oats, baking powder, cinnamon, nutmeg, and salt. Mix well.
In another bowl, whisk together the grated carrots, applesauce, maple syrup, milk, and vanilla extract until smooth.
Pour the wet ingredients into the dry ingredients and stir until fully combined. If using, fold in the chopped walnuts and raisins.
Spread the mixture evenly in the prepared baking dish, pressing down gently to ensure it is compact.
Bake for 25-30 minutes, or until the edges are golden brown and a toothpick inserted in the center comes out clean.
Allow the bars to cool in the pan for about 10 minutes, then lift them out using the parchment overhang and let them cool completely on a wire rack before slicing into squares.