Preheat the oven to 400°F (204°C). Lightly oil a 9×13-inch baking dish or coat it with nonstick cooking spray.
Cook the pasta according to the package directions until al dente. Drain well and set aside.
Heat the olive oil in a large sauté pan over medium heat. Add the artichoke hearts and cook for 4–5 minutes, stirring occasionally, until the edges become lightly golden and crisp.
Add the garlic and spinach. Sauté for 2–3 minutes, until the garlic is fragrant and the spinach is heated through.
Add the butter. Once melted, stir in the flour, salt, thyme, black pepper, and red pepper flakes. Cook until the flour is incorporated and no dry spots remain.
Slowly pour in 1 cup of vegetable stock while whisking continuously. Once the mixture begins to simmer, add the remaining stock and milk.
Simmer for about 5 minutes, stirring occasionally, until the sauce thickens slightly.
Remove the pan from the heat. Whisk in the cream cheese, mozzarella, and lemon zest until the cheese melts into a smooth sauce.
Add the cooked pasta and stir until evenly coated. Transfer the mixture to the prepared baking dish.
In a small bowl, combine the crushed crackers, Parmesan, and melted butter.
Sprinkle the topping evenly over the pasta.
Bake uncovered for 15–20 minutes, until the topping is golden brown and the sauce is bubbling around the edges.
Let the spinach and artichoke pasta bake rest for 5–10 minutes before serving.