Preheat your oven to 400°F (200°C). Slice the top off the head of garlic, exposing the individual cloves. Drizzle with 1 tablespoon of olive oil, wrap in foil, and place on a baking sheet.
In a separate bowl, toss the halved cherry tomatoes with 1 tablespoon of olive oil, 1/4 teaspoon of sea salt, black pepper, and red pepper flakes if using. Spread the tomatoes on the same baking sheet, but keep them separate from the garlic.
Bake the garlic and tomatoes in the preheated oven for 25-30 minutes until the tomatoes are bursting and the garlic is soft.
While the garlic and tomatoes roast, prepare the ricotta. In a mixing bowl, combine the ricotta cheese with the remaining olive oil, sea salt, balsamic vinegar, and dried oregano. Mix well until all ingredients are thoroughly incorporated.
Transfer the ricotta mixture to a suitable baking dish, smoothing the top with a spatula.
Once the garlic and tomatoes are roasted, reduce the oven temperature to 350°F (175°C). Squeeze the roasted garlic cloves out of their skins and mash them with a fork. Fold the mashed garlic into the ricotta mixture gently.
Place the baking dish with the ricotta mixture back into the oven. Bake for 20-25 minutes, or until the ricotta is set and the top is beginning to turn golden brown.
Remove the baked ricotta from the oven and let it cool slightly. Top with the roasted tomatoes and a sprinkle of fresh basil before serving.