Preheat oven to 375°F (190°C). Lightly butter or grease a 9x13-inch baking dish.
Peel peaches and slice into 1/2-inch wedges, discarding pits. Measure out 4 cups.
In a large bowl, combine sliced peaches and blueberries. Add sugar, cornstarch, lemon juice, lemon zest, cinnamon, salt, and vanilla (if using). Toss gently until evenly coated. Let sit for 5 minutes.
Pour fruit mixture into the prepared baking dish and spread into an even layer, distributing blueberries evenly.
In a separate bowl, whisk together oats, flour, brown sugar, cinnamon, and salt. Cut in cold cubed butter with a pastry cutter until pea-sized clumps form. Stir in chopped pecans.
Sprinkle topping evenly over the fruit filling, covering completely. Leave it loose rather than pressing down.
Bake for 40 to 45 minutes until topping is deep golden brown and filling is bubbling at the edges. Tent with foil if browning too quickly.
Remove from oven and let rest on a wire rack for at least 15 minutes before serving. This allows the filling to thicken.