Prepare the tofu feta as directed, allowing for marinating time (4-24 hours).
Preheat your oven to 400F. Place the tomatoes and garlic in a rectangular baking dish. Add the oil. Mix the tomatoes to coat them with the oil. Transfer the tofu feta, including all of the marinade, to the baking dish. Stir everything to combine it. If using thyme, nestle the sprigs in the dish.
Transfer the baking dish to the oven. Bake for 30 minutes. Stir the ingredients, then return the baking dish to the oven. Bake for another 15-25 minutes, or until the tomatoes have all burst, the liquid is bubbling vigorously, and the liquid is darkening along the edges of the dish. Remove the dish from the oven and discard the thyme sprigs.
While the tomatoes and feta bake, bring a pot of salted water to a boil. Boil the pasta according to package instructions. Drain the pasta, reserving 1/2 cup cooking liquid.
Stir the pasta into the baking dish. If using basil, add it to the dish, then stir it in until it’s wilted. Add freshly ground black pepper to taste and the reserved pasta water if you feel the pasta needs to be a little more saucy. Serve.