In a large skillet, heat a drizzle of olive oil over medium heat. Add the finely chopped onion and sauté until it becomes translucent and fragrant, about 5-7 minutes.
Once the onions are ready, add the coarsely chopped spinach to the skillet. Cook until the spinach has wilted down, about 3-4 minutes. Season with salt and pepper to taste. Remove from heat and set aside.
In a saucepan, melt the butter over medium heat. Whisk in the flour to create a roux, stirring constantly for about 2 minutes until it is golden. Gradually pour in the whole milk, continuing to whisk until the sauce thickens and is smooth. Season with salt and pepper, and set aside.
Preheat your oven to 180°C (350°F). In your oven-safe baking dish, start by spreading a layer of béchamel sauce on the bottom. Place a layer of lasagna sheets over the sauce, followed by a layer of the sautéed spinach and onions. Drizzle some basil pesto over the spinach, and sprinkle a layer of Parmesan cheese. Repeat the layers until all ingredients are used, finishing with a layer of béchamel sauce and a generous sprinkle of Parmesan on top.
Cover the baking dish with foil and bake in the preheated oven for 25 minutes. After 25 minutes, remove the foil and bake for an additional 15-20 minutes, or until the top is golden and bubbly.
Once the lasagna is out of the oven, allow it to rest for about 10 minutes before cutting. This will help the layers set and make serving easier.