My opinion would be to connect a vacuum gauge and see if there is a problem involving compression. That procedure is quick, easy, and cheap.
If the vacuum gauge shows a problem then remove the spark plugs and run a compression test.
If the compression test shows a tight valve then it’s pointless to throw money at it until the valve issue is sorted out; and that could mean an expensive fix.
Those valves should be checked/adjusted every 30k miles but this is seldom done.
You’re likely to find more specific information in a more active, model specific Subaru forum - , I’ve found subaruoutback.org. useful, and there are others.
It would help to know if a problem came on suddenly and possibly associated with something else that occurred around the same time, or if it developed gradually.
Things you can check: Start with the codes, though they may not tell the whole story. Is routine maintenance up to date - plugs, air filter, EGR and crankcase ventilation systems clear and functioning, are vacuum lines flexible and in place, vs. cracked and leaking? Consider doing the easy stuff, to save expense.
A number of faults can cause similar symptoms. A competent mechanic with an ignition analyzer should be able to determine if anything’s faulty before you throw parts at it. If plugs are old you might replace them on general principle, as a mechanic will do, and you can do it a lot cheaper.
If it’s your first time, look at several videos before changing plugs - with some years/models (like our 2006 6 cyl) access is easier from below, it may look tight but clearance is sufficient and it’s not difficult (unlike what some would have one believe).
If there’s good reason to suspect water in the gas, the proper type of alcohol or additive (check the manual for alcohols that shouldn’t be used) might help, but don’t exceed the recommended quantity. Additives won’t fix gas that’s gone bad.
I used to own 2003 outback, I believe that’s the same model generation
I had similar troubles and the cure was to clean the throttle plate AND idle-speed-air-valve, which was all covered with carbon and was definitely sticking in closed position
cleaning both requires minimal effort and no special tools other than a screwdriver