Hello
your narrative corresponds to Psoriasis. It usually appears as red or pink plaques of raised, thick, scaly skin or white flakes as you call it. It most commonly affects the skin on the elbows, knees, and scalp, though it can appear anywhere on the body. It is non-contagious, autoimmune disease.
The duration of the symptoms are not mentioned, it could have started as dandruff which refuses to go with too many change in anti-dandruff/ anti-fungal shampoos with only temporary relief only to come back in more thicker, on scratching causes red bleeding spots, at times frank red spot on scalp or area cut of shaving on face with delayed recovery.
Health Tips
1. Never scratch and remove the flakes