Preheat the oven to 200°C, fan 180°C, gas 6. Put the squash on baking sheets, brush with 1 tablespoon of the oil and season with freshly ground black pepper. Roast for 45 minutes, until just tender.
Meanwhile, heat the remaining oil in a frying pan over a medium heat and cook the onion for 5-7 minutes. Add the garlic and fry for 1 minute, then tip into a bowl. Stir in the chestnuts, cranberries, half the walnuts and half of the cheese.
Scoop out the roasted squash flesh and chop into bite-size pieces. Add to the bowl and mix until combined. Season with freshly ground pepper. Pile the filling into the roasted squash halves. Top with the remaining cheese and walnuts, then scatter over the breadcrumbs.
Bake for 10-15 minutes until the cheese is melted and bubbling.
Meanwhile, cook the beans in a pan of boiling water for 5 minutes until tender. Drain and serve with the squash.