Preheat the oven to 350°F (175°C).
Melt the butter in a 9x13-inch baking dish by placing it in the oven while it heats. Remove once melted.
In a mixing bowl, combine flour, sugar, baking powder, and salt.
Stir in milk (and vanilla if using) until just combined. Do not overmix.
Pour the batter evenly over the melted butter in the baking dish. Do not stir.
Spoon the peaches and some of the reserved syrup or juice evenly over the batter. Again, do not stir.
Sprinkle cinnamon and nutmeg on top if desired.
Bake for 40 to 45 minutes, or until the top is golden brown and a toothpick inserted into the crust comes out clean.
Let it cool for at least 10 minutes before serving.