The sentence does not really make sense on a stand-alone basis because the past perfect is used to imply that an event occurred before another event in the past. And the two events explicitly mentioned presumably were concurrent as indicated by the word "when." But washing a face is not an instantaneous event. Thus, it would be more idiomatic to introduce the subordinate clause with "while" rather than "when" and to use either the past progressive or past perfect progressive for the subordinate clause's verb.
He squirmed and wriggled and screeched while his father was washing his face.
But if there was a sequence of events mentioned, then the double use of the past perfect would be perfectly appropriate.
Before he kicked his father in the shins, he had squirmed and wriggled and screeched while his father had been washing his face.
Moreover, in a context where the succeeding event to the washing and carrying on was clear but implied, the actual sentence would again be appropriate (as Kate Bunting pointed out in her comment), subject to my qualms about the conjunction and progressive.
In short, there is no rule against having a past perfect tense in both a main and subordinate clause when showing sequential actions in the past. The reason that it is unusual is the frequency with which the sequence itself is shown in different clauses of the same sentence.