Sauté onion and garlic in butter in a heavy skillet over medium heat until tender.
Combine squash and flour; toss until coated. Add squash, corn, green pepper, salt, pepper, orégano, and sugar to sautéed vegetables in skillet; toss gently. Cover and cook over low heat 20 minutes. Add tomatoes and cook, uncovered, 10 minutes. Stir in capers, if desired.