Heat the sugar in a small saucepan over medium heat, stirring constantly, until melted and golden amber. Pour it into an 8-inch (20 cm) round pan and, working quickly with oven mitts, swirl to coat the bottom and a little up the sides.
Preheat the oven to 350°F (177°C). Set the 8-inch pan inside a 13x9-inch baking pan and fill the outer pan with hot water to about 1/2 inch (1.25 cm) deep.
Drain the pineapple, reserving the juice. In a blender, combine the eggs, 1/2 cup pineapple chunks, 1/2 cup pineapple juice, condensed milk, and evaporated milk. Blend until smooth and pour over the caramel.
Bake for about 1 hour, until the flan is set and a knife inserted in the middle comes out clean.
Cool on a rack for 30 minutes, then refrigerate at least 4 hours or overnight until completely cold and firm.
Run a knife around the edge of the pan, invert a serving plate over it, and flip in one quick motion. Gently shake to release.
Top with pineapple chunks and toasted coconut flakes. Serve cold, spooning the caramel over each slice.