Hello and hope you are doing well.
The swelling could be a salivary gland enlargement, namely the parotid gland or an enlarged lymph node. The duct of the parotid gland can get blocked and this could cause the symptoms with eating. Please consult a dentist for assessment. He may even ask for blood test and an X ray.
Hope this helped and do keep us posted.
Try eating a pickle.
If it hurts like heck...it could be mumps.
But seriously...
It could be that you have developed an allergy. Allergies change as we get older. One day you're fine, the next day you eat shrimp and you're in the hospital.
Try to avoid anything with tomato in it for at least the next 48 hours.
Then, in 3 days from now, eat one. If the gland swells again, you know what it is that you are allergic to.