Bring a large pot of lightly salted water to a boil. Cook spaghetti in the boiling water, stirring occasionally, until cooked through but firm to the bite, about 12 minutes. Drain.
Combine cream, clams with juice, garlic, and anchovies in a large pot over medium heat; bring to a simmer and remove from heat. Add red pepper flakes and stir.
Beat egg yolk in a small bowl. Add one spoonful hot cream mixture to egg and stir. Repeat twice. Pour egg yolk mixture into cream mixture and stir.
Add cooked spaghetti to the cream mixture; stir to coat the pasta, cover the pot, and let sit until flavors combine and pasta soaks up some of the sauce, about 5 minutes. Sprinkle Parmesan cheese over the top and season with salt. Ladle pasta into bowls; top with croutons and basil.