Sift the flour and baking powder together; set aside.
Put the butter and sugar in the bowl of a stand mixer fitted with the paddle and mix on low speed to combine, then beat on medium speed for about 3 minutes, until light and creamy, stopping to scrape down the sides as necessary. Mix in the vanilla. Add the eggs one at a time, beating until the first one is incorporated before adding the second and scraping down the sides as necessary. Beat in the milk. Add the flour mixture in 3 batches, beating just until combined.
Pour the batter into the pan and spread over the pineapple. Bake for 15 minutes. Rotate the pan for even browning and bake for another 20 to 25 minutes, until a cake tester or wooden skewer inserted in the center of the cake comes out clean. Cool the cake in the pan on a cooling rack for 20 to 30 minutes.
Run a knife around the edges of the cake, invert onto a serving platter, and serve warm. Leftover cake can be stored at room temperature for up to 2 days.