Slice spaghetti squash in half length-wise. Using a metal spoon, scoop seeds out. Lay face down on a parchment-line baking sheet. Cook for 30 minutes, or until soft.
While squash is cooking, add minced garlic and 2 T water to a medium skillet over medium-high heat. Cook for 2 minutes. Add diced onion and let cook for 4 more minutes, adding 1 T of water at a time, if needed.
Add diced peppers, beans, corn, cumin, chili powder, salt, and red pepper flakes (if using) and cook for 5 minutes.
Once squash is cooked, carefully flip so it is face up. Run a fork along the inside of each squash to loosen some of the noodles. Add half of black bean and veggie mixture to each squash.