Hello,
From the symptoms it can be due to contact dermatitis to the shaving cream used or to the blades of the razor or due to eczema. Eczema is a form of chronic dermatitis (rash).Allergic reaction is one of the important causes of eczema. Allergic reaction can occur to strong soaps, Solvents, chemicals, certain foods, food additives, plants, metals, cosmetics, even urine and faeces of some animals (dust mites).
I suggest you to get it evaluated from a dermatologist and get the diagnosis confirmed.
It is very difficult to precisely confirm a diagnosis without examination and investigations and the answer is based on the medical information provided. For exact diagnosis, you are requested to consult your doctor. I sincerely hope that helps. Take care and please do keep me posted on how you are doing.