Heat oil in a skillet over medium heat; stir in onion. Cook and stir until the onion has softened and turned translucent, about 5 minutes. Add tomatoes, vinegar, 1/2 of the basil, salt, and pepper. Cook and stir until tomatoes are heated through, about 2 minutes.
Pour onion-tomato mixture into a casserole dish. Sprinkle pine nuts on top.
Bake in the preheated oven until tomatoes start to brown, 25 to 35 minutes. Cool and transfer to serving platters using a slotted spoon. Serve with the rest of the basil.