In a Dutch oven, heat the oil over moderately low heat. Add the onions and cook, stirring occasionally, until translucent, about 5 minutes. Add the garlic, paprika, cayenne and oregano and cook, stirring, until fragrant, about 1 minute.
Stir in the pimientos, tomatoes, squash, water and salt and bring to a simmer. Cook the stew, covered, stirring occasionally, until the squash is almost tender, about 15 minutes. Uncover and simmer vigorously until almost no liquid remains in the pan, about 5 minutes. Add the beans and corn and cook until the corn is just tender, about 5 minutes. Stir in the basil.