Bring a large pot of salted water to a boil. Add the elbow macaroni and cook according to package directions until just al dente. Drain and set aside.
In a large saucepan, melt the butter over medium heat. Reduce heat to low and whisk in the flour to form a smooth paste (roux).
Gradually whisk in the milk until smooth. Increase heat to medium and whisk constantly until the sauce begins to thicken, about 2 minutes.
Stir in the shredded Havarti and shredded sharp white cheddar and 1/2 teaspoon sea salt. Continue stirring until the cheeses melt and the sauce is smooth. Season with freshly ground black pepper to taste.
Add the drained 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 chopped fresh basil, reserving some basil for garnish.
Serve topped with generous dollops of pesto, remaining basil, and pinches of red pepper flakes to taste.