coils do not fail very often, but of course they can, any part can fail.
but when they do fail, it is usually either the front two cylinders or the rear two cylinders that have trouble. cylinder 2 & 4 are both on the driver side of the car. this does not indicate a coil problem. typically, if it is not plugs and wires, this indicates a timing problem. but since you just got the car back from the shop, they would have to be a pretty crappy shop to mess up the timing.
so, we are going to assume the shop you took the car to is reasonably competent. especially since the miss was there before they worked on the car.
move one of the plug wires from the left side of the engine to the right side of the engine. if the miss moves with the wire, then we have our answer.
the leading cause of misfires after major engine work is the timing is off.
BUT, the leading cause of misfires (without major engine work) is the plug wires. plugs is the number two cause. plugs and wires probably account for 90% of misfires when no major engine work is involved.
so move a plug wire. this is pretty easy. you can do it yourself, or with help from your spouse.(if you have one)
these engines are a little picky about plugs and wires. plugs should be NGK platinums, and the wires should be subaru from an online dealer (to save $$), or a very, very, HIGH quality alternative. cheap plug wires will give you headaches, as well as misfires. sometimes right out of the box.
move a plug wire and let us know what you learn. you can move both if you want, just do them one at a time so you do not mix them up.