Heat the oil in a deep, ovenproof saute pan. Add the onions and fry over a medium heat for 5 minutes until softened, then add the garlic and cook for a minute more.
Add the zucchini and mushrooms, increase the heat and fry for about 5 minutes until they are lightly browned. Add the chopped tomatoes and 400 milliliters (1 3/4 cups) boiling water and season well with salt and pepper. Bring to a simmer and cook for 10 minutes over a medium heat.
Preheat the broiler to high. Stir the spinach and pasta strips into the pan and, once the spinach has wilted, stir in the basil and two-thirds of the Parmesan and half the mozzarella. Scatter the rest of the cheese over the top and put under the broiler for 3 to 5 minutes until bubbling and oozingly melty.