Preheat oven at 180°C or 375°F. Grease a baking pan with butter or oil and keep it aside.
If the grated cassava is frozen then simply thaw it before using. If the frozen cassava has juice, squeeze some of it out before combining it with the other ingredients. If using fresh cassava, peel and remove the skin portion from the outside. Wash before grating with a fine grater (for a smoother texture). Squeeze some of the excess juice through a fine sieve. Do not squeeze too tightly.
Mix grated cassava, coconut milk, butter, egg, evaporated milk, sugar, and condensed milk in a large mixing bowl until well combined.
Pour the mixture into a greased pan and bake for 45 minutes to 1 hour at 375°F/180°C.
Prepare the custard topping by mixing condensed milk, evaporated milk, coconut milk, and egg in a medium bowl until well combined, then set aside.
When the cassava cake is golden brown and firm, about 45-50 minutes into baking, remove it from the oven and spread the topping over it. OPTIONAL: sprinkle with grated cheese on top. Then bake for an additional 15 to 25 minutes, or until the custard is set and golden.
Allow to cool completely, then serve it warm or cold