Dear klam,
I've had hesitation problems with my Subaru Liberty 2006 2.0 auto a while ago.
The valves you referred to is , I believe to be the secondary air injection system- air switching valves. Sometimes code- P2441 air switching valve stuck closed or stuck open. I cleaned the valves.
you can use a flathead screwdriver and scrape the carbon deposits away then using carby cleaner, let the cleaner soak for a while and wipe off. I also used the original rubber gasket.
About the EGR valve, I believe it is very close to the alternator, in between the alternator and the intake manifold. It is easier to remove the EGR valve if you loosen the alternator belt and lift the
alternator upwards. You can try cleaning it with carby cleaner once disassembled, pushing the spring back and forth whilst spraying carby cleaner should free any seizures.
I also changed the PCV valve which is a red plastic valve located above the intake manifold and close to the intake pipe. You can google Subaru Outback 2010 PCV valve- Outback 2010 and Liberty
2006 use the same type of PCV valve, or search Ebay, it's quite inexpensive.
I have not had anymore hesitation problems after cleaning the valves and replacing the PCV valve. The car feels much more powerful also.
I recommend using 98 octane fuel, it's cleaner for the engine.
Have a great day.
P.S- I also cleaned the Air Flow Meter with Mass Air Flow Sensor cleaner which might help to stop hesitation problems.