Preheat the oven to 350°F. Spray a 9x13-inch baking dish with nonstick cooking spray. Set aside.
Bring a large pot of salted water to a boil. Add the pasta and cook just until al dente, about 8 minutes. Drain the pasta and set aside.
In a large pot, melt the butter over medium heat. Reduce the heat to low and whisk in the flour to create a paste.
Add the milk and whisk until smooth. Increase the heat to medium and continue whisking until the sauce starts to thicken, about 2 minutes.
Stir in the shredded cheese and continue stirring until the cheese is melted and the sauce is smooth. Fold in the pesto and any add-ins you like.
Add the pasta, stirring to combine, and cook just until the pasta is warmed through.
Season with salt and pepper to taste.
Put it all in a casserole dish. Top with cheese and, if desired, bread crumbs.
Bake 20-25 minutes, or until cheese is melted and bubbling.
