Cook barley (or whatever grain you're using). Chop ham and broccoli.
Preheat oven to 350.
Heat oil over medium-high heat in a Dutch oven. Reduce heat and saute onion until softened. Add garlic and saute 1 minute more.
Add broccoli and salt, and return pot to medium-high heat. Stir fry until broccoli begins to brown. Add water, cover and steam until broccoli is tender. Season with salt and pepper.
In small bowl, whisk together ricotta, sour cream, and eggs.
Add cooked barley, cooked ham, and basil to the pot. Add ricotta mixture and 1 cup of the cheese.
Sprinkle top with remaining cheese.
Cover and bake 20 minutes. Uncover and bake an additional 10 minutes until cheese is melted and bubbly.