Preheat oven to 350°F (175°C). Lightly grease a 9x13 inch baking dish with butter or nonstick spray.
Peel peaches using a paring knife or vegetable peeler. For very ripe peaches, drop in boiling water for 30 seconds, then transfer to ice water for easy peeling. Slice into 1/2 inch thick wedges, discarding the pit.
Place sliced peaches in a large mixing bowl. Add granulated sugar, cornstarch, lemon juice, cinnamon, nutmeg, and a pinch of salt. Toss gently until peaches are evenly coated. Let mixture sit for 5 minutes to release juices and dissolve cornstarch.
Pour peach filling into the prepared baking dish. Spread into an even layer and scrape any remaining juice and sugar from the bowl over the top.
In a separate mixing bowl, whisk together flour, oats, brown sugar, cinnamon, and salt. Add cold, cubed butter and use a pastry blender or two forks to cut butter into dry mixture until it resembles coarse, pea sized crumbs. Stir in vanilla and pecans if using.
Sprinkle topping evenly over the peach filling, covering completely. Place dish on a baking sheet to catch any bubbling juices.
Bake for 40 to 45 minutes, until topping is golden brown and filling is bubbling around the edges.
Remove from oven and let rest on a wire rack for at least 15 minutes before serving to allow filling to thicken. Serve warm, on its own or with a scoop of vanilla ice cream.