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. Reduce the heat to low and whisk in the flour to form a smooth paste (roux).
Gradually add the milk while whisking until smooth. Increase heat to medium and continue whisking until the sauce thickens, about 2 minutes.
Remove the pan from heat, then stir in the shredded Havarti and sharp cheddar until melted and the sauce is smooth. Season with 1/2 teaspoon sea salt and freshly ground black pepper to taste.
Add the drained pasta to the cheese sauce and stir to coat, warming the pasta through over low heat for a minute or two.
Stir in the thawed peas and chopped fresh basil. Adjust seasoning as needed.
Serve with generous dollops of pesto and a pinch or two of red pepper flakes on each portion.