Bring a large pot of lightly salted water to a boil. Cook spaghetti at a boil until cooked through but firm to the bite, about 12 minutes; drain. Transfer spaghetti to a large bowl.
Drizzle olive oil over the spaghetti; toss to coat. Add anchovy fillets, garlic, balsamic vinegar, lemon juice, red pepper flakes, and black pepper; mix. Cover bowl with plastic wrap and refrigerate until chilled.