Your lungs can feel weird after swimming due to swimming induced pulmonary edema which is a condition in which fluid accumulates in your lungs and can cause shortness of breath and a cough and sometimes also cause blood tinged sputum.
Your lungs may also feel weird after swimming if you ingested some chlorinated pool water which also contains some other added chemicals.
Swimming induced pulmonary edema is also known as immersion pulmonary edema and is a type of pulmonary edema and occurs when fluid leaks from the small blood vessels in your lungs "which are called the pulmonary capillaries" and leaks into the airspaces or alveoli during or after swimming.
Swimming induced pulmonary edema can occur during surface or underwater swimming even in the abscence of water aspiration and it can also affect people that have no underlying health problems.
You stomach can after swallowing pool water because the pool water contains chemicals like chlorine and algicides which can cause stomach upset, gastrointestinal distress, bloating and stomach pain.
Even exposure to possible germs in the pool water such as Giardia and Cryptosporidium can cause your stomach to hurt after swallowing the pool water and lead to gastrointestinal issues.
Ingesting large amounts of chlorine and other pool chemicals can cause digestive issues and digestive upset including vomiting, nausea and stomach pain and in severe cases ingesting excessive amounts of chlorine could lead to chlorine poisoning, which can cause burning in the mouth, stomach pain and throat pain.
It is bad to drink pool water as the pool water can contain bacteria and parasites and other contaminants and the chlorine in the pool water can also be harmful.
Even though pool water is chlorinated especially in public pools it may still contain some parasites, viruses, bacteria etc from other swimmers even after the chlorine treatment.
People also pee in swimming pools and babies even though they have on a swim diaper may poop and the poop could leak out into the swimming pool water.
Some common pathogens which can be found in pool water include Norovirus, E. coli, Giardia and Cryptosporidium which can also cause gastrointestinal illnesses.
And ingesting large amounts of chlorine can cause digestive distress and other health issues including possible kidney failure, kidney disease, colon cancer and other cancers.
Pools can also contain other chemicals such as cyanuric acid which can also be harmful to your health in high enough concentrations.
Swallowing pool water can cause gastrointestinal illnesses and skin rashes as well as swimmer's ear and other health problems.
Swallowing a small amount of pool water accidentally is unlikely to harm you but you should avoid swallowing or drinking pool water.