Pour boiling water over the porcini mushrooms to cover them according to package directions (about 1½ cups) . Let soak for at least 30 minutes.
Meanwhile, slice onions and shallots. Grab a nice, large non-stick skillet, heat heat 1½ tablespoons of olive oil and 1½ tablespoon butter over med heat. Add the onions and shallots and cook over low to medium heat for about a half an hour to an hour, until the onions are caramelized. This will take time so be patient.
While onions are caramelizing, you can clean, trim, and roughly chop your fresh mushrooms into small pieces. Not too small, not minced, mushrooms will shrink when cooked. When porcinis are soft chop them into pieces that are similar in size. Reserve the soaking liquid, and add water to the mushroom water to equal 1 cup.
In another non-stick skillet, (or wait until onion/shallot mixture has caramelized, remove them/set aside and use the same skillet), heat 1½ tablespoons of olive oil and 1½ tablespoon butter. Add the chopped garlic, stir for 30 seconds until fragrant then add the mushrooms. Sauté the mushrooms, stirring occasionally, until they start to release their liquid. Add thyme and keep cooking over medium heat until the excess liquid has cooked away and the mushrooms have browned. Sprinkle the flour over mushrooms and stir for 1-2 minutes so the flour can cook and mixture can thicken.
Add the wine and the soaking liquid from the dried mushrooms. Combine the mushrooms with the caramelized onions. Stir in cream. Now you can taste and adjust salt and pepper as needed.
Turn on oven and let heat to 400°.
Pour the mushroom mixture, spreading evenly, into a large gratin dish prepared with cooking spray. Set aside.