Prep the oven and pan: Heat oven to 350°F (175°C).
Lightly grease the sides of your cake pan. If using a springform, wrap the outside with two layers of foil to prevent leaks.
Make the caramel: In a medium saucepan, combine sugar, water, and lemon juice. Cook over medium heat without stirring.
Swirl the pan gently as it bubbles. When the syrup turns a deep amber, remove from heat immediately. Carefully pour the hot caramel into the cake pan, tilting to coat the bottom evenly.
Let it firm up slightly.
Whisk the flan mixture: In a bowl, whisk eggs, sweetened condensed milk, evaporated milk, vanilla, and a pinch of salt until smooth. Do not over-whisk; avoid too many bubbles.
Mix the cake batter: In another bowl, whisk flour, sugar, baking powder, and salt. Add milk, oil, egg, and vanilla.
Whisk just until combined and smooth. Do not overmix.
Layer carefully: Pour the flan mixture gently over the set caramel in the pan. Spoon the cake batter evenly over the custard.
It may seem like it sinks, but during baking the layers will switch—this is normal and part of the magic.
Set up the water bath: Place the filled cake pan inside a large roasting pan. Slide into the oven rack, then pour hot water into the roasting pan to reach halfway up the sides of the cake pan.
Bake: Bake for 55–70 minutes, until the cake is golden and a toothpick inserted into the cake portion comes out with a few moist crumbs. The custard should jiggle slightly in the center but not look watery.
Cool gradually: Remove the pan from the water bath.
Let cool on a rack for 1 hour, then cover and chill at least 4 hours, preferably overnight. Chilling helps the custard set and the caramel loosen.
Unmold and serve: Run a thin knife around the edge. Place a rimmed platter over the pan and invert quickly and confidently.
Lift off the pan to reveal the caramel sauce flowing over the top. Slice with a warm knife, wiping between cuts.