In a blender container or food processor bowl combine fresh basil leaves, fresh spinach leaves, grated Parmesan or Romano cheese, pine nuts or almonds, salt, and 2 cloves garlic, quartered. Cover; blend or process with several on-off turns until a paste forms, stopping the machine several times and scraping the sides. With the machine running slowly, gradually add 2 tablespoons olive oil and 2 tablespoons water; blend or process until mixture is the consistency of soft butter. Set aside.
For garlic, peel away the dry outer layers of skin from the garlic heads. Leave skins of cloves intact. Cut off the pointed top potion (about 1/4 inch) with a knife, leaving the bulb intact but exposing the individual cloves.
Place garlic, cut side up, in a small baking dish. Brush sides and top of garlic with olive oil. Bake, covered, in a 400 degree F oven for 25 to 35 minutes or until cloves feel soft when pressed. When cool enough to handle, press the garlic paste from the individual cloves (you should have 2 tablespoons).
In a large saucepan combine the garlic paste, potato, leeks, onion, water, bouillon granules, and pepper. Bring to boiling; reduce heat. Cover and simmer about 10 minutes or until potato is tender, stirring occasionally. Stir in 1-1/2 cups of the milk. Gradually stir the remaining milk into the flour; stir into the mixture in the saucepan. Cook and stir until thickened and bubbly. Cook and stir 1 minute more.
To serve, ladle into soup bowls. Top each serving with about 1 tablespoon of Pesto; swirl slightly with a knife. (If necessary, thin Pesto with a small amount of water before using.) (Store any remaining pesto in a storage container. Cover and refrigerate up to 2 days or freeze.) Makes 4 to 6 side-dish servings.