2In a saucepan, combine the sugar and water. Cook over medium heat until the mixture turns golden brown to make caramel.
3Carefully pour the caramel into a 22 x 15 cm baking dish, tilting to coat the bottom evenly. Let it cool and harden.
4In a blender, combine shredded coconut, eggs, coconut milk, sweetened condensed milk, vanilla extract, and rum (if using). Blend for 30 seconds until smooth.
5Pour the flan mixture over the cooled caramel in the baking dish.
6Place the baking dish inside a larger pan and fill the larger pan with hot water until it reaches halfway up the sides of the flan dish.
7Cover the flan dish with aluminum foil.
8Bake in the preheated oven for 1 hour.
9Remove from the oven and let the flan rest for 10 minutes.
10Optionally, sprinkle extra shredded coconut on top before serving.