Heat the olive oil in a large pot over medium-high heat. Add the chopped onions and cook, stirring frequently, until they begin to brown, about 5 minutes.
Lower the heat to medium, stir in the carrots, and cook until the vegetables are soft, another 4 to 5 minutes. Add the minced garlic and cook for 1 more minute, stirring constantly.
Pour in the vegetable broth, scraping the bottom of the pot to release any browned bits. Bring to a boil.
Mix in the diced pumpkin (or butternut squash), crushed tomatoes, rinsed beans, chili powder, cumin, cinnamon, salt, and cayenne, if using. Cover and return to a boil.
Reduce the heat to maintain a gentle simmer. Cook uncovered for about 30 minutes, or until the pumpkin is tender when pierced with a fork.
Taste and adjust seasoning as needed. Serve hot, garnished with diced onion, jalapeños, cheese, and/or pepitas, if desired.