Answer: I think the answer depends upon what kinds of flowers you want to plant. Flowering perennials will need some space all around so they can grow and so that air can circulate behind them so don't plant too closely. The distance from the wall will be determined by the plants you select. Upward growing plants such as snapdragons and delphiniums can be planted a little closer than bushy plants such as Shasta daisies. Check the garden center at your local Home Depot for flowering perennials (for either sun or shade, depending upon the conditions at the base of the foundation). Then check the plant tag to see how large they grow. Plant them at least that far from the wall, plus 6-12" for air circulation.
Best wishes with your new plants!
Q&A Library Searching Tips