All perfect praise be to Allaah, The Lord of the Worlds. I testify that there is none worthy of worship except Allaah, and that Muhammad is His slave and Messenger.
You did not clarify to us the terms and conditions of the insurance contract between you and the company and you did not clarify to us its kind so that we will know whether it is lawful or unlawful because it is impossible to give a ruling on something which we do not know.
Your statement that the investment of the money is subject to profit and loss and if any loss occurs, it is the subscriber who bears it and not the insurance company, then this is something unusual in commercial insurance companies.
Anyway, it might be that the insurance company where you invested your money abides by the Islamic conditions and its insurance is cooperative and mutual and not commercial nor forbidden. In this case, it is permissible to join the cooperative and mutual insurance and benefit from the profit that it gives. However, we cannot authoritatively state that the transaction is forbidden or lawful since we did not see the terms and conditions of the contract. For more benefit on the ruling on all kinds of insurance, please refer to Fatwa 81425.
However, if we presume that the contract is a forbidden insurance contract and its profits are also forbidden, and you cannot stop it except after the elapse of a given period of time otherwise you will lose what you had invested in it, then we hope that you are not sinful because of this investment as long as you did not know that it was forbidden. It is enough for you to sincerely repent, regret what you did and be determined not to return to it again.
Also, you may keep in the company the money that you had already invested in it because of necessity until the time period expires, and then when you take it, you have to get rid of the forbidden profits and keep the capital money only. You should not leave the profits for the company, rather you should spend it in charitable fields and on the poor and destitute.
The same thing applies to the investment that you had made for your son, you should only take the capital money and get rid of the profit.
Allaah Knows best.