Place tomatoes, onion, and garlic on a baking sheet. Drizzle with olive oil, season with salt and pepper. Roast 30–40 minutes until blistered and caramelized.
Transfer all roasted vegetables to a blender or food processor. Blend to desired texture. For a smooth sauce, press through a fine mesh strainer.
Pour into a pot, add oregano and red pepper flakes. Simmer 10–15 minutes.
Stir in fresh basil. Taste and adjust seasoning before serving.