They sure can, unfortunately. My son showed signs of anxiety first when young but had a blue period around age 7. He got over it but it came back in middle school and then in high school, he had a full on major depression mental health spiral. It resulted in two hospital stays, 4 weeks the first time and 7 the second. My suggestion is to do whatever it takes early to work on cbt reframing distorted thoughts of depression, building self esteem and DBT coping skills.
So this can happen It happened to me. From the time I was 7 to 13 I was bullied very baldly and it got to the point that when they start calling me fat I started starving myself. I felt like I wasn't good enough I would be too tired to go to school, and at the age of 12 I started self harming. So yes children can suffer from depression that is one of the reason we have child therapist.
The chances are low but in rare cases kids who show some kind of signs of depression and anxiety. The kids need to spend their time with their loved ones.