01 - Preheat oven to 400°F. Line a baking sheet with parchment paper.
02 - Halve the spaghetti squash lengthwise and scoop out the seeds. Brush the cut sides lightly with olive oil, place cut-side down on the prepared baking sheet, and roast for 35–40 minutes or until the flesh is tender and easily shredded with a fork.
03 - While the squash roasts, heat a large skillet over medium heat. Add a splash of olive oil, then sauté the onion, bell pepper, jalapeño (if using), and garlic for 4–5 minutes until softened.
04 - Stir in the corn, black beans, and drained tomatoes. Add cumin, chili powder, smoked paprika, oregano, salt, and pepper. Cook for another 3–4 minutes, stirring occasionally. Remove from heat.
05 - Once the spaghetti squash is cool enough to handle, use a fork to shred the flesh into strands. Reduce oven temperature to 375°F.
06 - In a large mixing bowl, combine the shredded spaghetti squash with the vegetable-bean mixture. Stir in half of the cheddar and Monterey Jack cheeses.
07 - Transfer the mixture to a lightly greased 9x13-inch casserole dish. Sprinkle the remaining cheese evenly on top.
08 - Bake for 20–25 minutes, or until the casserole is hot and the cheese is bubbly and lightly golden.
09 - Garnish with chopped cilantro and serve with lime wedges.