Bring a large pot of salted water to a boil. Add the 8 ounces of elbow macaroni and cook according to package instructions until just al dente—usually about 7 to 8 minutes. Drain the pasta and set it aside. Don’t overcook here, as the pasta will continue to cook in the oven.
In a medium saucepan, melt the 1/4 cup butter over medium heat. Once melted, add the minced garlic and sauté for about 1 minute until fragrant but not browned. Sprinkle in the 1/4 cup all-purpose flour and whisk continuously for 2 minutes to form a roux.
Gradually pour in the 2 cups of milk, whisking constantly to prevent lumps. Continue cooking and stirring until the sauce thickens and coats the back of a spoon, about 5 to 7 minutes. Stir in the onion powder, garlic powder, salt, and pepper to taste.
Lower the heat to medium-low and add the shredded mozzarella and cheddar cheese to the sauce. Stir until completely melted and smooth. Remove from heat.
In a large mixing bowl, combine the cooked macaroni, chopped fresh spinach, and chopped canned artichoke hearts. Pour the cheese sauce over the mixture and stir gently to combine evenly.
Preheat your oven to 350°F (175°C). Transfer the cheesy pasta mixture into a greased 9x13-inch baking dish, spreading it out evenly.
In a small bowl, mix together the bread crumbs and grated Parmesan cheese. Sprinkle this mixture evenly over the mac and cheese.
Place the baking dish in the preheated oven and bake for 20 to 25 minutes, or until the topping is golden brown and the cheese sauce is bubbling around the edges.
Remove from the oven and let the Spinach-Artichoke Mac and Cheese Bake rest for 5 minutes before serving. This helps the sauce thicken slightly for easier serving.