Preheat oven to 400°F (200°C). Toss sweet potato and butternut squash slices with olive oil, salt, pepper, and thyme. Roast for 20–25 minutes, until tender.
Sauté garlic and spinach in a skillet for 2–3 minutes until wilted. Let cool slightly and mix with ricotta and half of the feta.
Melt butter in a small skillet over medium heat. Add sage leaves and cook until the butter turns golden and smells nutty. Remove from heat and stir in lemon juice and a pinch of salt.
Layer sweet potato, butternut squash, spinach-ricotta mixture, walnuts, feta, and a few cranberries. Repeat for 2–3 layers.
Place the stacks in a baking dish and bake at 375°F (190°C) for 15–20 minutes, until heated through and lightly golden.
Drizzle generously with sage brown butter and sprinkle with the remaining walnuts, feta, and cranberries.
