Rinse beans in a colander. Bring beans and 4-1/2 cups water to boiling in a Dutch oven; reduce heat and simmer, uncovered, for 2 minutes. Remove from heat, cover, and let stand for 1 hour. Drain and discard the liquid. Add 4-1/2 cups fresh water; bring to boiling. Reduce heat and simmer about 2 hours or until beans are tender.
Meanwhile, cook onion and garlic in hot oil until tender. Add basil, salt, and red pepper. Stir onion mixture into beans. Add squash and corn; cover and cook 15 minutes more or until squash is tender. Makes 6 to 8 servings.
If using fresh corn, remove husks. Scrub with a stiff brush to remove silks; rinse. Cut kernels from cob.