You have to do the best you can do. This is an extremely competitive and critical field. Don't try to write for all ages at once. Once you have an idea, narrow your focus and decide which age group it will be best for. Make the age group as narrow as you dare.
Children have different reading abilities and different experiential backgrounds.
And modern children think differently from those born 60 years ago. Listen to children and try writing for them, not about them. Don't talk down to children. They are not idiots, just human beings at an early stage of development. Respect their intelligence at all levels.