Preheat oven to 375 degrees F (190 degrees C). Grease a shallow 2-quart baking dish.
Remove stems from mushrooms and finely chop stems. Combine chopped stems, Parmesan cheese, mozzarella cheese, green onions, olive oil, garlic, salt, and black pepper in a bowl. Spoon filling into mushroom caps; arrange caps in the prepared baking dish.
Bake in the preheated oven until the mushrooms are tender, 10 to 15 minutes.