Preheat your oven to 180°C/350°F. Grease a 9-inch pan and set aside
To make the caramel layer, place sugar in a nonstick pan over medium heat. Stir constantly until fully melted and deep amber in color. Immediately pour into the pan and allow to set
For the flan layer, whisk eggs and cream cheese in a bowl until smooth. Then whisk in condensed milk, evaporated milk, vanilla, and salt. Strain the mixture through a sieve, then pour it over the caramel in the pan
Cover the pan with foil and place into a large roasting pan. Add boiling water until it reaches halfway up the sides of the pan. Bake for 45 minutes
While baking, prepare chocolate cake batter. In a bowl, whisk cocoa powder and hot water until smooth. Whisk in oil and yogurt, then the eggs. In a separate bowl, combine flour, granulated sugar, and brown sugar. Add wet mixture and whisk until smooth
After 45 minutes, remove the flan from the oven. Gently pour the cake batter over the top, cover again with foil, and bake in the water bath for 1 hour 20–30 minutes. After 1 hour, remove the foil and continue baking until a toothpick comes out clean