Until someone checks for stored trouble codes, it would be impossible to guess the exact source of the problem. Since the CEL has “been on forever”, don’t be surprised if there are multiple trouble codes that will require multiple fixes.
While I don’t want to give you false hope, I will give you one possibility that is a very low-cost repair option. A disconnected or leaking vacuum hose can lead to fluctuations in RPMs, and can cause an engine to shake and jolt. If that is the problem, fixing it should cost less than $10–if the mechanic spots the exact problem quickly.
However, you could have a problem with the Mass Airflow Sensor (MAF).
Cleaning the MAF is cheap, replacing it will run into a bit of money–perhaps $150-200 for parts & labor, depending on your locale and your mechanic.
All of that being said, when a CEL flashes/blinks, rather than being steadily illuminated, this means that the engine needs immediate attention, as there is a misfire taking place in the engine and continuing to drive it in that state WILL lead to expensive engine damage–so I am very glad that you are taking immediate action.
You didn’t tell us anything about how the car has been maintained, but I suspect that things are not necessarily up to date in that department. Poor maintenance can lead to a cascading sequence of problems, so I would not be surprised if several things need to be done in order to make the engine run properly again. Even though this will may not be cheap, deferring things at this point will inevitably make repairs even more expensive.
Please report back to us on what your mechanic comes up with as a diagnosis.
Try to get the exact trouble codes (the format is similar to “P0123”), and we can try to give you more specific advice based on those codes.