Arrange a rack in the upper third of the oven and heat the oven to 375°F. Lightly coat a 9x13-inch baking dish with cooking spray. Bring a large pot of heavily salted water to a boil over medium-high heat.
Meanwhile, dice 1 medium yellow onion. Mince 2 garlic cloves. Heat 1 tablespoon olive oil in a large skillet over medium-high heat until shimmering. Break up 1 pound lean ground beef into chunks and place in the pan in one even layer. Let cook until well browned and almost cooked through, about 5 minutes.
Season with 1 teaspoon of the kosher salt and 1/4 teaspoon of the black pepper. Stir and break up into smaller chunks with a wooden spoon. Reduce the heat to medium and cook until cooked through, 1 to 2 minutes.
Add the onion and garlic, and season with the remaining 1/2 teaspoon kosher salt and 1/4 teaspoon black pepper. Cook, stirring occasionally, until the onion is soft, reducing the heat as needed if the onion starts to brown, about 8 minutes. Add 1 tablespoon tomato paste and cook, stirring occasionally, until the paste darkens in color, 2 to 3 minutes.
Sprinkle 1/4 cup all-purpose flour, 2 tablespoons chili powder, 2 teaspoons ground cumin, and 1/2 teaspoon dried oregano into the pan. Cook, stirring, until fragrant, about 1 minute. Add 1/2 of the cup low-sodium chicken broth and stir, scraping up any browned bits from the bottom of the pan with a wooden spoon and making sure no lumps form. Stir in another 1/2 cup low-sodium chicken broth. Stir in the remaining 1 1/2 cups chicken broth.
Add 2 (10-ounce) cans Rotel tomatoes and their juices. Stir and bring to a simmer. Reduce the heat to medium-low and simmer until thickened, about 15 minutes. Meanwhile, add 1 pound dried spaghetti to the boiling water and cook for 2 minutes less than package instructions for al dente.
Meanwhile, drain and rinse 1 (about 15-ounce) can black beans. Measure out 1/2 cup frozen corn kernels. Cut 8 ounces of the Monterey Jack cheese into 1/2-inch cubes. Grate the remaining 8 ounces cheese on the large holes of a box grater (about 2 cups). Prepare desired toppings.
Drain the spaghetti and return to the now-empty pot. Add the sauce, black beans, corn, and cubed cheese, and stir to combine.
Use tongs to transfer the spaghetti mixture to the baking dish in an even layer. Spoon any sauce left in the pot into the baking dish. Sprinkle with the grated cheese. Sprinkle with selected toppings if desired.
Bake until bubbling and the top starts to brown, 35 to 40 minutes. Let cool for 10 to 15 minutes before serving. Garnish with chopped fresh cilantro if desired.