Combine the flour, baking powder, baking soda, salt, cinnamon, ginger, and nutmeg in a bowl. Set aside.
Using an electric hand mixer or a stand mixer, beat the butter, granulated sugar, and brown sugar on medium speed until smooth and creamy, 3 to 4 minutes. Scrape down the sides and bottom of the bowl as needed. Add the milk and vanilla; mix until incorporated.
Reduce the speed to low and gradually beat in the flour mixture; mix until combined.
Stir in the oats, grated carrots, and pecans (if using) and mix until evenly distributed.
Scoop out 1 1/2 to 2 tablespoons of dough for each cookie. Roll each portion into a ball and place it on a baking sheet or large plate. Refrigerate for at least 30 minutes or up to 2 days.
Preheat the oven to 350ºF (180ºC). Line two large baking sheets with parchment paper or silicone baking mats.
Place the chilled cookie balls on the prepared baking sheets, evenly spacing them about 2 inches apart. I recommend baking one sheet at a time.
Bake for 13 to 15 minutes, until barely golden brown around the edges, but still soft in the middle. When you remove the cookies from the oven, they will still look doughy, and that’s okay; they will continue to set as they cool.
Cool on the baking sheets for 5 minutes, then transfer to wire racks to cool completely. Store in an airtight container at room temperature for up to a week.