In many situations, it is not possible to satisfy everyone. Still, some form of compromise can be reached in a lot of cases.
First of all, your roommates are right to demand that the cat gets out of the apartment. They agreed to it temporarily, and are probably fed up about it, but tolerated it because it was, in fact, temporary (there might even some legal problems, make sure pets are allowed in our apartment).
The problem is miscommunication with your parents. You have some options there. make it clear to them that you understood that this was a temporary solution. You said you will be able to move in a few months. So ask your parents to take back the cat temporarily, until you can move. Make sure to stress that you will tae the cat as soon as you get a new place to live (and make sure your new place to live can accomodate your cat). Your parents will not be happy, but they might agree to this compromise. Make sure to stress that you can not keep the cat.
In the meantime, you can make it easier for your roommates and might even persuad them to keep up with the cat a bit longer. Go out of your way to make sure your at doesn't bother them. Wake up early, before the cat starts to make noise, and either settle the cat or take it outside.
Make sure to clean up after your cat quickly. Also, littering outside the box is a symptom of a problem. Get another litter box. Preferably a bigger one. Clean it more often. There are usually reasons why cats do not use litter boxes, and all of hem can be remedied (maybe its in the wrong location?). I wonder why you kept the cat for four months and never ever tried to find a solution to the littering problem, it would have gone onto my nerves on the second day, and i would have scarmbled to fix that problem before it began inconveniencing my roommates.
If the littering problem is also a problem for your parents, solving the littering problem might also buy you a lot of goodwill with your parents. "Hey Mom, Dad. Look, I bought this new litter box. The cat really likes it and doesn't poop outside anymore. She is much more easy to handle now. unfortunately, I stil can not keep her in the apartment, but given that she is clean now, she is much easier to take care of. I will also do grocery shopping for you twice a week if you look after the cat until I can move". Sound like a good compromise, doesn't it?
You say your girldfirend can not host the cat. Why is that? There are households with multiple cats. Explore that option. you should question what obstacles there are too it and wether those can be remedied (e.g. by castrating your cat, if that is an issue). Don't dismiss this possibility easily. maybe your girlfriend is just afraid of the responsibility? taking care of the cat of another person is a big responsibility, and maybe the issue isn't even the cat, but the leap in your relationship this might mean. So have an open and honest talk with her.
The thing is, you will not achieve a situation where everyone gets what they want right now (because their current wants are contradictory), but you might be able to reach a compromise or modify some wants (or offer some payback) in order to achieve consensus. And you will likely be the one to make sacrifices, too, because its your cat, and your problem and you want to inconvenience others. So make sure you let them feel that you apreciate what they are doing and pay it back in kind (by making sure you do what you can to remedy all problems as far as possible, but also by offering your help, support, and of course free beer now and then).
So, explore those options. And be prepared that you are the one who has to make the most sacrifices in order to get your problem solved. Most people are quite approachable and give in to your needs when you demonstrate your goodwill and determination to do the best you can to minimize inconveniences. But make sure to follow up on your promises, as broken expectations lead to frustration and resentment.