Preheat the oven to 400°F. Grease a 10 inch casserole dish with non stick spray and set aside.
Bring a large pot of salted water to a boil then cook the pasta until almost al dente (approximately 10 minutes). The pasta will continue cooking in the oven.
Heat a large skillet over medium-high heat and add the butter or coconut oil. Once it’s melted and hot, add the sliced onions and cook until soft and translucent then turn the heat down to medium-low and continue to cook for 10-15 more minutes, stirring frequently. The sugars in the onion will release and start to turn a golden, amber color.
Add the garlic and continue to cook until just softened and fragrant, 1 more minute. Stir in the spinach and sauté until wilted, about 5 minutes. It will seem like a lot of spinach but it will cook down.
Add the paleo mayo (or sour cream) and full fat coconut cream (or heavy cream) and stir until melted and combined.
Dissolve the cornstarch with a tablespoon or two of water in a small bowl then add it to the skillet and cook, stirring occasionally, to bubble and thicken.
Pour in the parmesan cheese or nutritional yeast, chopped artichoke hearts, lemon juice and salt and pepper and stir until combined. Carefully transfer the spinach cream sauce to the prepared casserole dish.
Drain the pasta and dump it on top of the spinach artichoke cream sauce then toss well with a wooden spoon. Add a few tablespoons of pasta cooking water if the sauce seems to thick. Sprinkle with mozzarella cheese, if using, then bake in the preheated oven for 25-30 minutes until it’s heated through and bubbling around the edges.