For the soup, heat vegetable oil in a large pot or Dutch oven set over medium-high heat. Add the onions and pepper and cook, stirring, until softened and beginning to brown, 5 minutes. Add the garlic, chili powder, cumin, coriander, salt, and cayenne pepper, if using. Cook, stirring constantly, until the spices are fragrant and toasted, 1 to 2 minutes. Add the tomatoes and bring to a simmer, scraping any browned bits off the bottom of the pan. Add the hominy, black beans, kidney beans, and 4 cups water. Bring to a boil, reduce the heat to medium-low, cover, and simmer until thickened, 45 minutes. Season to taste with salt.
To serve, ladle the soup into serving bowls and serve with bowls of the garnishes, if desired.