Preheat oven to 400 degrees, and line a rimmed baking sheet with parchment paper. Toss tomatoes and garlic cloves with the olive oil, and place them on the baking sheet. Roast for 35 - 40 minutes, or until the tomatoes are charred.
Heat the butter in a stock pot or Dutch oven over medium heat. Add in the onions, and red pepper flakes. Sauté for about 5-6 minutes or until the onions start to brown.
Stir in the canned tomatoes, basil, oregano, and stock (or water). Add in the oven roasted tomatoes and garlic, including any juices on the baking sheet. Bring to a boil, and simmer, uncovered for about 25-30 minutes, stirring regularly.
Using an immersion blender, process the soup until desired consistency is reached. Season with salt and pepper to taste.