Combine onion, broccoli, celery, and garlic in a food processor. Add 1/4 cup water, ginger, dill, and salt; process until mixture is pureed.
Heat a nonstick skillet over medium-high heat. Add the puree; saute until water evaporates and puree is thickened, 7 to 10 minutes. Add black beans and kidney beans and gently mix. Reduce heat to low. Cook, covered, until flavors combine, about 10 minutes.
Preheat oven to 375 degrees F (190 degrees C). Butter a Dutch oven.
Heat oil in another nonstick saucepan over medium heat. Add rice; toast until rice is slightly glassy and smells nutty, about 5 minutes. Add 3 cups water. Pour rice and water into the Dutch oven; stir in the bean mixture.
Bake, uncovered, in the preheated oven, until all liquid evaporates, about 45 minutes. Mix occasionally to allow uniform baking.