Heat the oven to 180 C / 350 F. Grease a 23 cm / 9-inch square baking pan and line it with parchment, leaving a 3 cm overhang on two sides.
Whisk the flour, baking powder, cinnamon, nutmeg, ginger and salt in a 3-quart / 2.8 L mixing bowl. Stir in the coconut and raisins until every piece is coated in flour.
In a 2-quart / 1.9 L mixing bowl, whisk the melted butter and brown sugar until smooth. Whisk in the egg, coconut milk and vanilla. Pour this over the dry mixture and fold with a spatula until no dry flour is visible. The batter will be thick and spoonable, not pourable.
Scrape the batter into the pan and press it level with the back of a damp spoon. Bake for 35 minutes, checking from 32 minutes, until the top is golden, the edges just pull from the sides and a toothpick in the center comes out clean.
Cool the cake in the pan on a wire rack for 20 minutes. Lift it out by the parchment, then cut into 12 squares, 3 across and 4 down. Serve warm or at room temperature.