The water hardness is a problem for the mollies in the longer term, they really need it to be harder, but I don't think it would lead to sudden deaths like that so quickly. Hard water fish in soft water gradually suffer from the lower calcium levels since they've evolved to excrete the excess calcium normally in their waters, and there isn't enough calcium in the softer water to replace the levels they've lost; while soft water fish who evolved to retain whatever calcium they find in their natural soft water, end up retaining too much calcium when in hard water... leading to a build up of minerals internally like in their kidneys, leading to a shorter lifespan. I only learned about this recently myself after keeping otocinclus, a soft water fish, in my hard water for a year

It isn't something enough places talk about when talking about suitable fish and compatibility.
So hardness is something you're going to need to explore, especially since you want the mollies in with a catfish. What species of cory is it? Some species can tolerate harder water than others. But the hard water thing is more of a chronic condition affecting the lifespan of a fish, not something that kills them in two weeks, and you'd likely see signs of the stress before they passed.
So I'd look for other suspects. When did you take that water test and get those results? Is the tank heavily planted? Is it possible that adding them to the new tank caused an ammonia spike that you didn't catch, and the filter and/or live plants took up the excess ammonia before you tested it? That's unlikely with only two fish in that size tank, but it's still a possibility.
Is it possible that something contaminated the tank? An air freshener sprayed in the room, handcream or perfume/cologne on hands that went into the tank, glass cleaner used on the outer glass? Always eliminate a contaminant when you have sudden deaths, especially with more than one fish.
It's also a sad fact that most livebearers are mass produced in fish farms abroad, and have all kinds of health issues as a result. Those farmed fish are often carrying both round and flat worms (I'm treating for both right now) and are genetically weak as a result of decades of poor breeding. It's very possible to have healthy looking fish from the stores that have genetic weaknesses or are carrying disease, then go through shipping to the store, exposed to more disease and stress, then bought and quarantined, then moved to a new tank, and they up and die from whatever underlying problems they have.
I went through a similar pattern with guppies when I started. Bought three, all died within days. Another trio, one died within 24 hours, one within a month, last lasted a few months. Water parameters always tested great, plenty of water changes, nice healthy diet. No one could help me figure out what I was doing wrong, and I was sure I must have. I was told about how weak livebearers are, but I was convinced it must be something I was doing, I almost gave up the hobby several times. Then some survived and bred, and the ones bred in my own tanks were stronger. I've also decided to medicate as a matter of course during quarantine for livebearers, since worms can stay hidden for months, and treating display tanks is a nightmare.
Sorry for long essay, I'm not good at concise. TL,DR: Check your water test results and when you took them (and what kit did you use? Dip strips aren't very accurate), check for contamination, check filter etc, and if all else fails, you might be the victim of poor fish producing practices.