Bring salted water to a boil and cook macaroni until al dente, about 6 to 8 minutes. Drain and set aside.
Preheat oven to 350°F.
Bring a skillet to medium heat and melt butter. Whisk in flour and toast for 2 to 3 minutes, or until the mixture is smooth and lump-free. Slowly add the milk and keep cooking until the mixture is thick enough to coat the back of a wooden spoon.
Add cheddar cheese, Italian seasoning, red chili flakes, and garlic powder, and mix until the cheese is melted through. Add pasta back into the sauce and toss to coat.
Sprinkle 1/2 cup mozzarella cheese and 1/4 cup parmesan cheese on the bottom of a pie dish. Top each with about half of the mac and cheese and spread out evenly. Pour 1 cup of pizza sauce on top and spread it out to cover the top. Add more mozzarella cheese and garnish with pepperoni and basil. Repeat process with a second pie dish. Bake uncovered for 15 minutes or until the cheese is melted. Serve immediately.