Baked Chicken Cacciatore
1 (14.5 ounce) can stewed tomatoes with juice 1 (8 ounce) can tomato sauce 1 (8 ounce) package sliced fresh mushrooms 2 cloves garlic, minced, or more to taste 2 small onions, chopped 2 tablespoons olive oil, or more as needed 6 (4 ounce) skinless, bone-in chicken thighs aluminum foil nonstick cooking spray ¼ cup all-purpose flour ¼ teaspoon garlic powder ¼ teaspoon ground black pepper ½ cup red wine, or more as needed ½ teaspoon salt, divided