Preheat oven to 200˚C fan on. Slice mushrooms fairly thickly and slice red onion into petals. Place the block of feta into the centre of a large roasting dish. Scatter the red onion and mushrooms around the feta. Tuck the thyme sprigs amongst them. Season everything well with salt and pepper and drizzle liberally with olive oil.Toss to coat. Roast in the oven for ± 20 minutes.
While the mushrooms and feta are roasting, cook the pasta. Cook in a large pot of salted water until al dente. (If you are worried about getting the timing just right and prefer to drain the pasta, reserve 2 cups of pasta water before draining) When the mushrooms are ready, remove from the oven and add the lemon zest. Stir everything together, adding a few splashes of pasta water as you go to create a creamy feta sauce.
Using tongs or a strainer transfer the pasta directly into the baking dish. Toss to coat in the creamy sauce adding as much pasta water as needed to keep things silky. Season well with freshly ground black pepper and a good squeeze of lemon juice. Serve topped with fresh thyme leaves and a sprinkle of Parmesan cheese.