I can think of two things here,either its Seborrhiec Dermatitis(dry skin
and flakes suggest that) or it could be allergic contact dermatitis(after shaving),which means that you may have changed your shaving gel/foam,brush,razor or ant other products and allergy
or sensitivity has occured.
I would suggest to apply 1% Hydrocortisone cream
to it two times a day for 3-5 days and keep it moisturised with white petroleum jelly.
If that helps tghen its ok but if not then i would suggest to see your doctor.
thanks vey much and all the best.