Remove the stalks from the mushrooms and chop finely.
Heat the oil in a frying pan. Add the garlic and gently fry until the garlic turns golden brown. Remove the garlic and reserve.
Add the butternut squash and red onion to the pan and fry until the squash begins to soften. Add the courgette and chopped mushroom stalks, and fry for a further 2-3 minutes. Transfer to a bowl.
Add the toasted garlic to the mixture along with the thyme, half of the parsley, salt and pepper. Mix well and divide the mixture between the mushrooms. Transfer to a baking tray and place in the oven for 25 minutes, or until the squash and mushrooms are both tender.