– 12 ounces dry shell or orecchiette pasta – 4 tablespoons salted butter, divided – 2 large cloves garlic, minced – 1/4 teaspoon salt – 1/4 teaspoon freshly ground black pepper – 2 cups fresh, frozen, or canned corn kernels, divided – 1/2 cup freshly grated Parmesan cheese, plus more for serving – 1/4 teaspoon crushed red pepper (optional) – 1/3 cup torn fresh basil or mint, plus more for garnish – 1 tablespoon lemon juice