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.
There is nothing wrong with studying engineering, and you should not leave this specialization.
As regards the issue of working afterwards, then you should look for work in a permissible field, and whoever seeks what is lawful, Allaah will enable him and help him.
If a person works in what is permissible in a company and does not deal with what is forbidden or help in it, then there is nothing wrong with that, even if the company commits some forbidden matters, and this does not affect his work or his salary.
For more benefit, please refer to fataawa 257608 and 92732.
Allaah knows best.