Preheat the oven to 350°F (175°C). Line a 12-cup muffin pan with cupcake papers.
In a large bowl, whisk together 1 ½ cups all-purpose flour, ¾ cup sugar, ½ teaspoon baking soda, ½ teaspoon cinnamon, ¼ teaspoon salt, ¼ teaspoon ground cardamom, and a pinch of grated nutmeg. Set aside.
In a separate bowl, whisk together 1 egg, ¼ cup applesauce, 1 ½ tablespoons olive or vegetable oil, ¾ cup mashed banana (about 2 large bananas), 4 ounces crushed pineapple (undrained), and 1 teaspoon pure vanilla extract until combined.
Pour the wet ingredients into the dry ingredients and stir with a spatula until just combined and no large streaks of flour remain. Do not overmix.
Stir in ½ cup chopped pecans, if using. If you want pecans as a topping, reserve a small portion before folding them into the batter.
Divide the batter evenly among the prepared muffin cups, filling each about 3/4 full.
Bake for 18–20 minutes, until a toothpick inserted into the center of a cupcake comes out clean or with a few moist crumbs. Remove from the oven.
Let the cupcakes cool in the pan for about 5 minutes, then transfer them to a wire rack to cool completely before frosting.
For the frosting, use a hand mixer to beat 8 ounces softened cream cheese and 6 tablespoons softened butter until smooth.
Add 1 teaspoon pure vanilla extract and 1 cup powdered sugar (add more to taste). Beat until the frosting is light, smooth, and spreadable.
Pipe or spread the frosting onto the cooled cupcakes and top with reserved chopped pecans, if desired.
Notes
Makes about 12 cupcakes (uses a 12-cup muffin pan).
Pecans are optional; reserve some for topping if desired.