Place an oven rack in the center of the oven. Preheat the oven to 400 degrees F. Line a heavy baking sheet with parchment paper.
For the vegetables: In a medium bowl, combine the tomatoes, onions, rosemary, salt, pepper and garlic (if using). Add the oil and toss until all the ingredients are coated. Arrange the vegetables in a single layer on the prepared baking sheet. Roast until the vegetables are golden and tender, 40 to 45 minutes. Working in batches, add the roasted vegetables (plus any cooking juices) and broth to a blender or food processor. Blend until smooth.
For the pasta: Place the tomato mixture, salt and pepper in a medium saucepan. Bring to a simmer over medium heat. Add the halibut and pasta and cook until the pasta is tender and the fish is cooked through, 3 to 4 minutes (if using cooked dried pasta, stir in after the fish is fully cooked). Stir in the chopped basil.