Chop the red onion and fry for a good 10 minutes in a pan with a drizzle of olive oil until the onion becomes translucent and tender.
Wash and cut the mushrooms.
When you've cooked the red onion for 10 minutes, add the mushrooms and fry for 2 more minutes and set aside.
Prepare a béchamel sauce: in a small saucepan, melt the butter cut into pieces with the sage leaves. When the butter has melt and the sage leaves have infused the butter, remove and set aside the leaves.
Add the flour to the melted butter. Mix vigorously with a wooden spoon.
Remove from the heat, add the tepid milk, then return to a low heat and stir for 2 minutes with a whisk to dissolve the butter-flour mixture in the milk.
Once you have obtained a homogenous consistency, let it thicken by continuing cooking and put the sage back in.
Once the bechamel has set, turn off the heat, remove the sage, and add a good dose of nutmeg, pepper and salt, then taste to adjust the seasoning. Set aside.
Once the squash is cooked, put the cubes into a salad bowl and add the ricotta. Mix gently with a fork so as not to turn the squash into a mash. Season with salt and pepper and taste to rectify if necessary.
In another bowl, pour half of the béchamel sauce and add the spinach. If you are using young shoots: rinse them first, then chop them finely and fry them for 2 minutes in a frying pan in a drizzle of olive oil. If you are using frozen spinach, thaw it first and then add to the béchamel sauce, stirring with a fork. Set aside.