Preheat the oven to 200˚C / 400˚F.
Separate the ‘neck’ of the butternut from the rotund body. Slice both sections in half vertically. Slice the neck into 1 cm thick slices. Remove the seeds and membrane from the body and slice into 1 cm / 3/8-inch thick semi-circles. Arrange the squash across two baking trays, drizzle with olive oil and season with sea salt and black pepper. Position on the middle and lower shelves of the oven and roast for 20 minutes, switching the trays halfway through cooking. Remove from the oven and set aside.
Meanwhile, heat a large saucepan over medium–high heat. Add 2 tablespoons of olive oil, along with the onion, and cook for 2 minutes until softened, then add the garlic, tomato paste and red chilli flakes and cook for a further 2 minutes. Pour in the crushed tomatoes, vegetable stock, sea salt and sugar, then cover with a lid and simmer over medium heat for 10 minutes.
Combine the ricotta and grated cheese in a bowl. Season with sea salt and black pepper
Spread a little of the tomato sauce in a baking dish (I used a 10-inch/25 cm square dish but you could use a slightly larger or smaller dish; rectangular dishes work great too). Start layering: lay one-third of your squash slices on the tomato sauce, dollop with one-third of the ricotta mixture (it won’t ‘spread’ as it’s thick, so I just dot little blobs), then add one-third of your remaining sauce and top with one-third of the mozzarella. Repeat these layers two more times – butternut, ricotta, sauce, mozzarella. You should finish with a layer of mozzarella.
Bake for 30–40 minutes, until the mozzarella is golden and the sauce is bubbly around the edges.
Wait for 10 minutes before serving. Serve topped with torn basil leaves and extra grated cheese.