Cook spaghetti according to package directions.
While pasta is cooking, melt butter in a large skillet over medium heat.
Add minced garlic and cook until fragrant, about 1 minute.
Stir in sliced sun-dried tomatoes and cook for another minute.
Pour in chicken broth and bring to a simmer.
Add cubed cream cheese and stir until melted and smooth.
Whisk in milk, dried basil, and black pepper.
Bring the sauce to a gentle simmer and cook for 5 minutes, stirring occasionally.
Stir in grated parmesan cheese until melted.
Add cooked spaghetti to the skillet with the sauce.
Toss to coat the pasta evenly.
Serve immediately, garnished with red pepper flakes if desired.
