Preheat the oven to 180°C.
Grease a 23cm cake tin with melted butter.
Stir melted butter, caster sugar, and light brown sugar together in the tin.
Arrange pear halves and walnuts in the sugar mixture.
Cream butter and sugar until light and combine dry ingredients separately.
Gradually incorporate the beaten egg into the creamed butter mixture.
Fold in the dry ingredients by hand until just mixed.
Pour batter over pears and bake for 40 minutes at 180°C.
Cool the cake in the tin for 10 minutes.
Invert the cake onto a rimmed plate.
Bring milk and cream to a boil, then cool slightly.
Stir in chopped chocolate until melted and smooth.
Serve warm cake slices with the chocolate sauce.