How to Make It
Preheat the oven to 300°. On a rimmed baking sheet, toss the tomatoes with the olive oil. Add the rosemary and thyme sprigs and season with salt and pepper. Bake for about 40 minutes, until the tomatoes are ready to burst. Strip the crispy leaves from the herb stems; discard the stems. Increase the oven temperature to 350°.
Light a grill or preheat a grill pan. Brush the onions with olive oil and season with salt and pepper. Grill over moderately high heat until nicely charred but still crisp in the center, about 3 minutes per side.
Transfer the onions to a baking dish. Add the vinegar and the 1/4 cup of olive oil and bake for 20 minutes, until tender. Let the onions cool in the liquid, then coarsely chop them. Reserve the liquid.
Bring a large pot of salted water to a boil. Add the fregola and cook, stirring occasionally, until the fregola is al dente, about 15 minutes. Drain and transfer to a large bowl.
While the fregola is still warm, add the onions and their cooking liquid, along with the tomatoes and crispy herbs. Stir in the vinegar and olive oil and season with salt and pepper. Garnish with the basil and serve.