In a blender, combine the garlic, basil, rosemary, sage, chili flakes, and a pinch of salt and puree. With the blender running, slowly drizzle in the olive oil.
Slice the bread into 1/2-inch thick slices and place on a cookie sheet. Brush with the garlic pesto. Sprinkle with Parmesan and mozzarella, if desired. Bake on the upper rack until golden brown and bubbly, about 5 to 7 minutes.