In a food processor, combine basil, garlic, pine nuts, and parmesan cheese. Puree until combined. As the food processor continues to run, slowly drizzle in 1/2 cup olive oil. Season with salt and pepper to taste.
Cook the elbow macaroni according to the instructions on the package. Drain and set aside.
In a large skillet, melt butter over medium heat. Stir in flour and cook until well combined. Whisk in milk and bring the mixture to a simmer. Cook until thickened, approximately 5 minutes.
Remove skillet from heat and whisk in cheeses, 1/4 cup pesto, black pepper, onion powder, garlic powder and salt. Stir in macaroni and spinach. Cook for 7-10 minutes. Serve immediately.