So I'm currently starting to write this idea that I've had in my head for a long time and a couple of months ago, I realised that my main female characters have the same names as the main female characters in The Flash (Iris and Caitlin). Ever since then, I've been searching for some replacements, but none of the names I've found feel right. Caitlin is a pretty average name, I think, but if you put it together with Iris, I feel like it's too obvious that they're the same as the ones from The Flash. Would it be okay to keep them like this? If not, I think I would just erase one of them and replace her with someone else.
I don't believe character names in themselves can be copyrighted nor would it be frowned upon to take a name from another story.
Since you didn't specify if the characters are defined by similar characteristics, physical features, or similar events as the characters from the show it's hard to speak if you should change the characters or not. If these features are different from the show Flash you should go for it.
On the other note, the character names you've mentioned are uncommon at best. If you asked me if I ever heard these names my answer would certainly be yes, but I wouldn't be able to put them on a specific character.
It would have been a completely different thing if you named your character John Snow, Kvothe, or Legolas. Not to say you aren't allowed to use these names, but your character would always be compared to its counterpart and I feel it might be hard to compete with the impact they already had on the reader.