Heat the oven to 350°F. Coat a 9x5-inch loaf pan lightly with cooking spray.
Beat 1 stick room-temperature unsalted butter, 1 cup granulated sugar, 1 teaspoon ground cinnamon, ½ teaspoon ground nutmeg, and ½ teaspoon kosher salt together with the paddle attachment in a stand mixer on medium speed until lightened in color and fluffy, 3 to 5 minutes. Stop and scrape down the sides of the bowl as needed.
Peel and mash 3 large very ripe bananas in a medium bowl with a fork or potato masher until smooth with just a few lumps (about 1 ½ cups). Add the banana and 2 teaspoons vanilla extract to the butter mixture and beat on medium speed until combined, about 20 seconds. Beat in 2 room-temperature large eggs, one at a time, beating well after each addition. The batter will look curdled.
Sprinkle 1 teaspoon baking soda evenly over the batter, then add 1 ½ cups all-purpose flour. Beat on low speed until just combined. Beat in ¾ cup chopped, toasted walnuts if using, until just combined, about 30 seconds. Transfer the batter to the pan and spread into an even layer.
Bake until a tester inserted into the center comes out clean, about 60 minutes. Let cool for 10 minutes, then flip the bread out onto a wire rack and let cool completely, about 2 hours more.
