What sort of shrimp did you have in mind ? If you get cherry shrimp, some of the babies are going to get eaten. This does not mean you can't have them, but it does mean that getting two of them and hoping for a colony is a bit optimistic.
Ghost shrimp, though you may not get babies, [ they have larvae first], are larger and might do better. Or there are the filter feeding shrimp, like Bamboos. They too have larvae, so no babies, but they live much longer than the little shrimp do. They're quite bold as a rule, so long as you provide a decent current for them to feed in. They also need some food suited to their needs.. I can give a you a list of things you can try if you want.
I once kept a community 29G with a fair number of danios, kuhlis and cories in it. I had Ghost shrimp, Blue Claw whisker shrimp, Bamboo shrimp, dwarf bamboos and Snowballs, the white form of cherry shrimp. I started with a few juvies and about twenty newborn Snowballs, as there was one berried female who gave birth the next day and then died. I was amazed that most of the Snowballs lived, though I didn't see many of them for nearly a month, 'til they grew bigger. Plenty of plants, rocks and wood for them to hide in, and they continued to reproduce.
I know some of them were eaten, but not enough to prevent a colony from growing. Just more slowly than in a shrimp only tank. So with those fish and that tank, it was possible. I don't think one pair would give you a colony though. I think you'd need a half dozen females and couple of males to have a decent shot at a colony. Or a fair size group of young ones.
The rule of thumb with shrimp is that if they are small enough to fit inside the mouth of a fish, they will be eaten. But mollies, I think, tend to be more vegetarian, so perhaps they wont bother them too much. Kuhlis have a small mouth, so only the very young shrimp are at risk and they still have to catch them, which they don't always manage to do.
The ones I'd worry about are the gouramis.. which are known for being fairly predatory. I don't know about rainbow fish.. never kept any. So with the gouramis, you might not have as much luck as I did with the little shrimps. But the Bamboo shrimp are usually at least two inches long when you buy them, if not larger, so they might do ok, if you like them. But you must give them a good current, places to perch in the current to fan feed, and suitable food to sift out of the water.