Tap water can have a high pH because bleach/ chlorine is alkaline and water companies add things to the water to keep the pH above 7.0 to stop pipes rusting.
You can have very soft water with 0 GH and a pH above 8.
The pH has nothing to do with this issue and captive bred rainbowfish are fine in water with a pH over 8.5. Melanotaenia boesemani actually come from a lake with a high pH.
--------------------
Melanotaenia lacustris (turquoise rainbow) go dark at night time and can look black in the morning when you first turn the room light on. This is normal nocturnal colouration for the fish. Many other fish change colour when it's dark.
--------------------
The M. lacustris is sick. He has flared gills, clamped fins, excess mucous and gunk on his mouth.
This is caused by poor water quality, chemicals in the water, or external protozoan infections. The flared gills are usually caused by poor water quality or gill flukes.
-----
The best treatment for rainbowfish is salt.
Add 2 heaped tablespoons of rock salt, sea salt, or swimming pool salt for every 20 litres (5 gallons) of tank water. Keep the salt in the tank for at least 2 weeks but no longer than 4 weeks.
If there is no improvement after a couple of days with salt, increase the dose rate to 4 heaped tablespoons of salt for every 20 litres of water.
If you do water changes, add salt to the new water before adding it to the tank so the salinity (salt level) in the tank remains stable.
-------------------
Increase aeration/ surface turbulence to maximise oxygen levels in the water.
-------------------
If you have an established filter (from the 20 gallon tank), move some of the filter media into the filter on the big tank (55 gallon). This will give you a cycled filter on the big tank.
Put all the rainbowfish in the big tank and treat them with salt.
Put the female Bettas in the 20 gallon with the Corydoras and some plants.
------------------
Rainbowfish and other fishes do better with bigger water changes. In future I would recommend doing a 75% water change and gravel cleaning the substrate once a week. Removing a large volume of water will help to dilute disease organisms more effectively and reduce the chance of disease outbreaks like this, which I reckon is an external protozoan infection and gill flukes.
Make sure any new water is free of chlorine/ chloramine before it's added to the tank.
Rainbowfish are sensitive to chemicals and chlorine/ chloramine can kill them if they are exposed to it.
--------------------
If you want rainbowfish, try to have even numbers of males (eg: 2 males, 4 males, 6 males, etc). Make sure the males are the same size to prevent bigger males bullying the smaller males.
Try to have a similar number of females to males.