Thank you for your question. The problem of evil is an issue that has been discussed extensively in philosophy of religion but unfortunately the issue is primarily framed in a way that emphasises certain Attributes of God based on the Christian tradition. There is also much confusion on the relation of God and time as well as on what knowledge actually is in relation to God.
In summary evil people are such through their own choice and it would be unjust for God to sentence them to eternal punishment without them actually choosing evil.
May you always be successful