Preheat the oven to 375°F (190°C) and heat a 9-inch ovenproof skillet over medium-high heat.
Add the oil to the skillet, then add the diced onion and minced bell pepper; cook 5–6 minutes until softened.
Add the ground beef and minced garlic to the skillet and cook, breaking the meat up, until no pink remains.
Stir in the chili powder, oregano, cumin, paprika, garlic powder, onion powder and 1/2 teaspoon each salt and pepper; reserve about 1/2 teaspoon of the seasoning to add later if desired.
Add the corn and cook 2 minutes to warm through.
Add the diced fire-roasted tomatoes with their juices and simmer until the tomatoes soften and the sauce thickens slightly, about 3–5 minutes; taste and adjust seasoning with the reserved seasoning if needed.
Toss the cooked spaghetti directly into the skillet with the sauce and stir until well coated.
Sprinkle the shredded cheddar evenly over the pasta, then transfer the skillet to the preheated oven and bake 15–20 minutes until the cheese is melted and bubbly.
Remove from the oven and let rest a few minutes, then garnish with dollops of sour cream, sliced jalapeño, minced cilantro, minced green onions and optional chili flakes; serve immediately.