It would help people to help you if you put your schematic in your forum post, not as something people have to download. Please create a jpg image and upload that to the forum. Please list the components in the forum for the same reason. Also the PCB layout from Altium Designer.
Your schematic shows the external connector with 'Vcc', but everything on the board is powered from 5V, not Vcc. How is the 5V derived from Vcc? Maybe that's the source of your problem.
Have you measured the change in voltage across the relay coils when you ground the input to their associated opto isolator? What do you see on a good one and a bad one?
Some photos of the board would help, clearly show the components and the soldering.
I know it is deviating more from the original issues raised by the OP but since we are redesigning it for him, here is another variant: PCF8575 cannot control relay switching - #13 by 6v6gt . It uses a clever design with an (AC) optocoupler that allows individual configuration of trigger high or trigger low on each channel.
Thank you very much for your comment. It is really helpful, and I appreciate it a lot.
I have added the schematic, the PCB layout, and the Bill of Materials in JPG format.
Regarding the Vcc and 5V, they are the same and are connected to each other on the PCB.
As for the voltage of the optoisolator, I found the following:
For K1 and K2 (the good ones), Vce = 2.28V
For the relay K3 (the bad one), Vce = 0.12V
EDIT
Have you made any changes between the circuits which work and those which don't. For example, even changing the colour of the LED could make a difference.
Sorry but please do this in a new post, by editing the original you have made to thread very confusing to anybody who wants to use this to solve a similar problem.
Have you seen the problem with your PCB, Q1 and Q2 etc, their emitters do not appear to be at gnd.