From an absolute or ultimate aspect, Krishna deals with this very question in the Bhagavad Gita, Chapter 2, verses 11- 30. To summarize, man is not bound by the law of causation (Karma). Pain and misery are not in man, they are but as the passing cloud throwing it'sits shadow over the sun, but the cloud passes, the sun is unchanged; and so it is with man. He is not born, he does not die, he is not in time and space. These ideas are mere reflections of the mind, but we mistake them for the Reality and so lose sight of the of the truth they obscure. Good and evil have existence only in relation to us. One cannot be had without the other, because neither has meaning or existence apart from the other. As long as we recognize duality, or separate God and man, so long we must see good and evil. Only be unifying ourselves with God (or Nirvana, both it'sits positive and negative meanings depending upon whether Mahayana or Theravedic Buddhist) can we escape the delusion of the senses. Then we escape both good and evil by transcending both. Evil only exists in the relative world we perceive. We wrongly perceive the world as having a real separate existence; it has no separate existence, it is all God. God is perceiving God, how can God hurt God? How can the eternal kill the eternal? Only through delusion. It is a delusion when we think we see evil.
If you want to analyze your question from a relative existence aspect, all Hindus and Buddhists believe in cycles, and it'sits corollary, karma (action). We all ultimately find our way to God or Nirvana, but we have to go through many births in doing so. As all action in this universe has a reaction (think the law of conservation of matter and energy), then there must have been a cause to the death of the innocent babies. We are seeing one moment in a long cycle of birth, death, and rebirth; perhaps there was an earlier cause in a prior birth. Perhaps the baby murdered a baby in a previous birth, or perhaps the individual in near the completion of all of their births and needed only a short life to burn away it'sits remaining karma. To judge what is innocence and what is not, you need to see the entire cycle, not just a snipetsnippet. See Jnana Yoga by Swami Vivekananda
btwBTW, in the Eastern tradition there is no difference between philosophy or religion or theology. These are Western constructs.
Edit (addressing comment): "...by stating that nothing is real (everything is maya)" - Now you are getting into some finer differences. Theravedic Buddhism would say yes, nothing is real, as when you rapidly whirl a torch in a circle, it appears that you have a solid circle of fire, but in reality it is not. In a sense they are real atheists. Mahayana Buddhism and Advaita Hinduism do not say nothing is real, they say that it is real, but you are wrongly perceiving it. Maya is not illusion as it is popularly interpreted. Maya is real, yet it is not real. It is real in that the Real is behind it and gives it its appearance of reality. That which is real in Maya is the Reality in and through Maya. Yet the Reality is never seen; and hence that which is seen is unreal, and it has no real independent existence of itself, but is dependent upon the Real for its existence. Maya then is a paradox- real, yet not real, an illusion, yet not an illusion.
"..so why bother wondering about it" - There are and have been many yogis that have taken this attitude. But until one can really see the Reality, wondering about it does serve a purpose. For those that have truly perceived the Reality, they often give up everything. The great Shankaracharya eventually just started walking into the Himalayas until death came.
"relative aspect...." - the earliest one to tackle the problem was Kapila, and his analysis was not on evil, but on understanding the nature of reality and how man perceived the world. He was the first psychologist. To be more definitive, there is no evil. There are those actions which lead to liberation and those actions which cause further binding to the perceived world of Maya. Some actions will bind more than others. Since this universe is a zero sum game (you can not add or take away 1 pound of force, for every action there is an equal and opposite reaction), there has to be a balance. If we are receiving a bit of nasty reaction, there had to be a cause or initial action to it.