Preheat your oven to 350°F (175°C) and place the rack in the middle position. Line a 9×5-inch loaf pan with parchment paper, allowing some overhang on the sides for easy removal.
In a medium bowl, whisk together the flour, baking powder, baking soda, salt, cinnamon, and nutmeg until well combined.
In a large bowl, beat the softened butter and sugar with an electric mixer on medium speed until light and fluffy, about 3-4 minutes.
Add eggs one at a time, beating well after each addition. Stir in vanilla extract.
Gradually add the dry ingredients to the wet mixture, alternating with milk, beginning and ending with the dry ingredients (three additions of dry, two of milk). Mix just until combined.
Gently fold in the diced apples and walnuts (if using) with a rubber spatula.
Pour the batter into the prepared loaf pan and smooth the top with a spatula. Give the pan a gentle tap on the counter to release any large air bubbles.
Mix the topping ingredients (sugar and cinnamon) in a small bowl. Sprinkle evenly over the batter, then drizzle with the melted butter.
Bake for 55-60 minutes, or until a wooden skewer inserted in the center comes out clean with just a few moist crumbs. If the top begins to brown too quickly, tent loosely with aluminum foil after about 40 minutes of baking.
Allow the bread to cool in the pan for 15 minutes, then use the parchment paper overhang to lift it out onto a wire rack to cool completely.