Heat the oil in a large, deep frying pan with an ovenproof handle over a medium-low heat, add the onion and butternut squash, then cover loosely and cook gently, stirring frequently, for 18–20 minutes until softened and golden.
Beat together the eggs, herbs and ricotta lightly in a jug, then season well with salt and pepper and pour over the squash mixture.
Cook for 2–3 minutes until the egg is almost set, stirring occasionally to prevent the base from burning.
Slide the pan under a preheated grill, keeping the handle away from the heat, and cook for 3–4 minutes until the egg is set and the frittata is golden. Slice into 6 wedges and serve hot.