Preheat your oven to 375 degrees Fahrenheit and grease your 9-inch baking dish so nothing sticks later. While the oven heats, spread the pecans on a rimmed baking sheet and toast them for 4 to 5 minutes until they smell nutty and warm. This one small step makes a noticeable difference in flavor, so I never skip it.
In your medium bowl, combine the oats, toasted pecans, cinnamon, nutmeg, baking powder, and salt. Give it a good whisk so the spices distribute evenly through the oats. This dry mixture is what gives the finished oatmeal its structure and warm, spiced flavor.
In a smaller bowl, whisk together the milk, maple syrup or honey, eggs, half of the melted butter or coconut oil, and the vanilla extract. Whisk until everything looks smooth and fully blended. If your coconut oil firms up from the cold milk, just microwave the bowl in short bursts until it melts again.
Set aside about half a cup of blueberries for topping later, then scatter the rest evenly across the bottom of your greased baking dish. Cover the berries completely with the dry oat mixture so no fruit peeks through yet. There's no need to thaw frozen blueberries first, they bake beautifully straight from the freezer.
Slowly drizzle the wet mixture evenly over the oats, making sure it reaches every corner of the dish. Gently wiggle the pan so the liquid works its way down through the oats instead of pooling on top. Pat down any dry oats that are still peeking out before moving on.
Scatter the reserved blueberries over the top, then sprinkle on the raw sugar if you want a little extra sweetness and crunch. Bake for 42 to 45 minutes, or a bit longer if you used frozen berries, until the top turns a deep golden brown. Let it rest for a few minutes before drizzling the remaining butter over the top.