Heat the olive oil under medium heat in a large pan. Add the sliced onions and cook until they start to soften, around 20 minutes, stirring regularly to avoid burning.
Once the onions start to caramelize, lower heat to medium low, stirring often, for around 10 minutes more. Add the cornstarch and combine well.
While the onions are caramelizing, add 2 tbsp olive oil to a small saucepan under medium heat. Add mushrooms and sauté, taking care not to crowd them, and keep them in a single layer.
Cook mushrooms for about 1 minute on one side, flip them, and cook for 2-3 more minutes. Add garlic and cook until fragrant, about 1 minute. When the mushrooms are nicely browned, remove from heat and set aside.
Once the onions are caramelized, add the vegetable broth, combining well. Simmer for about 5 minutes until it thickens.
Using a high speed blender or an immersion blender, blend the gravy until smooth and lump-free. Season with salt and pepper to taste. Stir in the mushrooms and serve.