Preheat the oven to 400° F. In a 9×13 inch baking dish, combine the zucchini, olive oil, garlic, shallots, Italian seasoning, cayenne pepper, salt, and black pepper. Cook for 15 minutes.
Take the zucchini out of the oven. To the same pan, add the orzo and pesto. Pour over 2 and 1/2 cups of water over the ingredients and stir to combine.
Return the dish to the oven and bake for 14 to 16 minutes. Most of the water should be cooked into the pasta at this point. There may be a little in the bottom of the dish, but that's okay.
Stir the pasta around, then sprinkle over the cheese.
Bake another 10 minutes, until the cheese has melted and the sauce is bubbling. If there's a lot of oil from the pesto on top, drain off the excess. Top with fresh basil!