Kegs and Preserve Jars can both increase the value of raw crops, but the better choice depends on the input, processing time and how many machines you can keep supplied.
Compare gross value first
Use the Artisan Value Calculator to compare raw and processed value for the specific item you care about.
Then compare processing time
A higher final price is not automatically better if the machine stays occupied much longer and a large backlog forms.
Machine capacity matters
If you have only a few machines, prioritize the inputs that make the best use of those slots. If machine capacity is abundant, convenience may matter more than perfect optimization.
Keep some raw goods
Bundles, gifts, cooking and quests can make raw items useful. Do not process everything automatically.
Use one farm-wide workflow
Greenhouse production, crop planning and artisan processing should be designed together. A farm that produces more than it can process is not automatically more efficient.