Preheat the oven to 350°F (175°C) and spray a 9x13-inch baking dish with cooking spray.
Break the spaghetti in half and cook in a large pot of boiling salted water according to package directions until al dente; drain well.
In a large bowl, whisk together Monterey Jack, 1/2 cup of the Parmesan, sour cream, ricotta, egg, salt, pepper, and garlic powder until smooth.
Add the drained chopped spinach, about 3 ounces of the crispy fried onions, and the cooked spaghetti to the cheese mixture; toss until evenly combined.
Transfer the mixture to the prepared baking dish, cover tightly with foil, and bake for 30 minutes.
Remove foil, sprinkle the remaining crispy fried onions and the remaining Parmesan over the top, then return to the oven and bake 5–8 minutes more until the top is golden and crispy.
Let the casserole rest at least 5 minutes before serving.