Preheat oven to 180 degrees C. Grease and lightly flour a 23cm cake tin, shaking off excess flour. Heat the caramel for a few minutes in the microwave to soften, then pour into the cake tin.
Prepare a water bath. Pour hot water into a baking dish larger than the cake tin. Place in the oven while it preheats.
Sift together flour, cornflour, baking powder, baking soda and cocoa. Set aside.
Place butter and sugar in a large bowl. Beat with an electric beater until fluffy. Beat in the egg and coffee. Add half of the flour mixture and beat until blended. Add half the buttermilk and beat in. Add the rest of the flour, then the rest of the buttermilk. Beat until just blended.
Pour the batter into the cake tin over the caramel.
Make the flan: beat together the cream cheese, evaporated milk, condensed milk, eggs and vanilla. Pour slowly over the cake layer.
Place cake in the water bath and bake 50-60 minutes, until firm. Let cool 1 hour.
To unmold, carefully pass a thin knife around the edges of the cake. Cover with a plate and carefully invert.