Bring a large pot of salted water to a boil. Add the elbow macaroni and cook until just al dente according to package directions. Drain and set aside.
In a large saucepan over medium heat, melt the butter. Lower the heat and whisk in the flour to form a smooth paste (roux).
Slowly add the milk while whisking to dissolve the roux; increase heat to medium and whisk until the sauce thickens, about 2 minutes.
Stir in the shredded Havarti and sharp white cheddar and 1/2 teaspoon sea salt; continue stirring until the cheese has fully melted and the sauce is smooth. Season with freshly ground black pepper to taste.
Add the cooked pasta to the cheese sauce and stir to combine, heating just until the pasta is warmed through.
Fold in the thawed peas and most of the fresh basil, reserving a little basil for garnish if desired.
Serve with generous dollops of pesto and a sprinkle of red pepper flakes and remaining basil.