In a 7x12-inch baking dish, combine the tomatoes, garlic, chives, basil, chili flakes, and pepper. Roast for 10 minutes.
After 10 minutes, to the same pan, add the orzo and pesto. Pour over 2 cups of vegetable stock into the pan and stir to combine.
Return the dish to the oven and bake for 25 minutes until the orzo is al dente and most of the water has cooked out. (You want a little water remaining, it'll soak into the pasta.)
When the pasta is cooked, sprinkle the shredded cheese over the top and return the casserole to the oven. Bake until the cheese melts.
Allow it to sit and cool for 5 to 10 minutes before serving.