It is highly likely that rather than a learned response, your baby is getting anxious at the routine he recognises and this is what's causing the vomiting. Small children don't have learned responses of vomiting, they aren't developed enough for that. It will be a fear response. He knows that he has to go through being left on his own for what feels like a long time, where his crying isn't responded to in the same way that it is during the day. This is causing him to feel scared and distressed and he is vomiting.
Several things I would suggest you try. Try changing the room round a bit so his bed is somewhere different, put maybe some cheap wall stickers by his cot, a special nightlight, some new blankets - some new positive things to associate with bedtime. Change the bedtime routine slightly to break the fear association he has formed - if you follow the normal routine he will be scared he will be in bed crying again. Do something different, even if it's just switching bath and story time round. Try and do as much of the bedtime routine in his bedroom as possible, make it cosy and a fun place to be - cosy lamp, lots of his favourite teddies, cuddles etc.
Does he self soothe? Could you give him a special blanket to hold, snuggle, suck whatever? I would do gradual retreat over the next few weeks. It will work and you will have bedtime sorted by the time new baby comes along. So first night say goodnight and lie down next to the cot, pretend to be asleep. If he cries, reach up with a hand, soothe through the cot and talk calmly, then pretend to go to sleep again. Eventually he should lie down. If he gets very distressed, pick him up, tell him that it's nighttime, time to sleep, mummy's right here and lay him back down, pretend to go to sleep. The first few days may be tough, he's going to be wary, but it's all about teaching him that you are still there, that he can trust you will be there during the night.
Once you've got that bit nailed, move further away the next night, say across the room, again, talk to him for a minute if scared but aim to maintain distance unless he gets very distressed then pick him up,reassure and then put back. Slowly over those two weeks work back until you can put him in bed, sit outside the room, talk to him if he needs you but let him do settle himself. You should then be able to put him in bed, say goodnight and leave him to settle, because he will believe that you are close by, because you have been consistently for those two weeks. He should sleep better and be able to self settle.
CC when he is already distressed and vomiting will not be successful or advisable. Regular vomiting can cause damage to the teeth and oesophagus and is distressing. This method may be tough for the two weeks but should completely transform bedtimes and will hopefully get this sorted before the new baby comes along. Good luck and let us know how it goes.
The first night will be the hardest. Avoid rocking him, you're teaching him that he must sleep in his bed but that you are going to be right there next to him. It's reassuring him that he isn't going to suddenly find himself alone. 18 months is also a prime time for separation anxiety so it's understandable he is reacting like this. Mine have both needed more cuddles at bedtime during times of separation anxiety, it soon passes with lots of reassurance.