Welcome to forums. If you want to add a variable's value permanently then you can add it in your .profile and then it will work for new sessions also.
Let me give you an example here.
Let's say we want to set prompt sign for a specific user then we can add it in .profile as follows.
will export the i variable, which you then overwrite several times in your loop.
Children do not necessarily run bashrc when created, so you may need to take extra action to have those variables available.