It is not the engines or the flap actuators. The noise is aerodynamic and comes from the airflow through the inner flap fuselage gap as the flaps are retracted, or extended.
Sounds a lot like a kamakazi to those not in the know and a lot of operators add a comment in their pax briefing so as not to scare the little old ladies in the back.
There was an attempt to cure it on the Avro RJ version but it is still there, although. not quite as loud.