Cook the spaghetti according to pack instructions.
Meanwhile, heat half the oil in a large frying pan. Sauté the onion and garlic for 10 minutes until soft. Remove from the heat and set aside.
Toss the beetroot with the remaining oil and the thyme. Heat another pan and cook the beetroot for 3-4 minutes. Transfer to a bowl and keep warm. Wipe the pan clean and add the spinach with a splash of water; cook for 2 minutes until wilted.
Stir the crème fraîche, stock and lemon juice through the onion and garlic mixture, return to the heat and cook for 2 minutes. Add the spaghetti and toss to combine.
To serve, stir the beetroot and spinach through the spaghetti. Divide between 4 bowls and top with the goats' cheese, lemon zest and some black pepper.