Simmer the potatoes in a saucepan of salted boiling water for 10 minutes, then add the beans and cook for a further 3–4 minutes until the potatoes are cooked through and the beans are just tender. Drain, return to the pan and mash to a lumpy purée.
Stir the garlic, basil, cheeses and eggs into the vegetable purée and season with salt and pepper.
Sprinkle an oiled cake tin or ovenproof dish with a thin layer of the breadcrumbs. Pile in the vegetable mash, sprinkle with the remaining breadcrumbs and drizzle with the oil. Bake in a preheated oven, 200°C (400°F), Gas Mark 6, for 25–30 minutes until the topping is crisp and golden.