Bring a large pot of well-salted water to a boil. Add pasta and cook according to package directions. Once cooked, drain pasta, reserve a 1 cup of the pasta water, and set aside.
In a large pan on medium heat, warm the butter and olive oil. Once warm, add the shallot and garlic clove and cook for 2-3 minutes until tender.
Add spinach, a splash of pasta water, and stir to combine with the onion and garlic mixture until spinach is wilted.
Add ricotta cheese, chili flakes, nutmeg, salt, and pepper and stir to combine with the vegetable mixture. Add additional pasta water until a generally smooth consistency is reached.
Add cooked spaghetti to the pan and toss to coat in the spinach ricotta mixture, adding some of the pasta cooking water to loosen the sauce as needed.
Season with additional salt and pepper to taste and serve immediately with freshly grated parmesan cheese.