Liberally grease your chosen pan with baking spray or softened butter. Set aside.
Add the granulated sugar to a small saucepan and place over medium heat. Cook, stirring regularly, until the sugar melts evenly. This will take around 7 to 8 minutes. Once the caramel turns a deep amber color and is slightly foamy at the edges, remove it from the heat and pour it into your pan. Using a kitchen cloth or oven gloves (as the metal pan gets hot quickly), tilt the pan to coat the base evenly and about 1-inch up the sides of the pan. Leave to cool and harden for at least 20 minutes, while you prepare the rest of the flan.
Heat the oven to 350 degrees with a rack in the center.
In a large bowl with the help of an immersion blender, or in a food processor, blend the pumpkin purée, cinnamon, ginger, nutmeg, allspice, salt, cloves, vanilla, cream cheese and all milks until smooth. Add the eggs and blend briefly until combined, about 10 seconds. Let stand for about 5 minutes and spoon off any froth or bubbles from the top if necessary.
In a large bowl, whisk together the flour, brown sugar, cocoa powder, granulated sugar, coffee, baking powder, baking soda and salt. In a large liquid measuring cup or bowl, mix together the eggs, pumpkin purée (use all that is remaining from the can), milk and oil. Pour the wet ingredient mixture into the dry ingredients and mix until well combined.
Pour the chocolate cake layer into your prepared pan and tap on the counter to let it settle evenly. Gently ladle the pumpkin flan over the cake, pouring slowly each time to minimize the mixing of the layers, leaving a 1-inch gap from the top.
Place the cake pan inside a larger roasting or baking pan. Cover tightly with foil. Carefully pour freshly boiled water into the larger pan until it comes about halfway up the sides of the cake pan.
Bake covered for 1 hour, then carefully remove the foil using oven gloves. Bake uncovered until a skewer inserted into the cake comes out clean, another 20 minutes. Remove the pan from the oven and carefully remove the chocoflan from the water bath and cool to room temperature before refrigerating until thoroughly chilled, preferably overnight.
About an hour before you’re planning to serve, take the pan out of the refrigerator and let it sit at room temperature for 30 to 45 minutes. Place the pan back into the larger roasting or baking pan, add enough boiling water to reach about halfway up the sides and let sit for 20 to 25 minutes. Carefully run a thin knife around the inside edge of the pan to loosen the cake. Place a serving platter over the pan, then carefully invert both together. Pour any remaining caramel from the pan over the top. Store leftovers loosely covered in the refrigerator for up to 3 days.
