Is there lumen loss when doing so & is there a formula to calculate it?
Yes. A filter can only absorb light, not increase it.
The formula is unfortunately not simple. It would relate the absorbtion spectrum of the filtter with the emission spectrum of the lamp, weighted by the (standardized) sensitivity spectrum of the human eye.
From a scientific perspective if light is simply electromagnetic waves vibrating at a specific wavelengths how is it possible to transform light from one wavelength to the other
A lamp doesn't just produce one wavelength. It produces a wide range of wavelengths with different amounts of power in each one (characterized by a spectrum). For an incandescent lamp, the spectrum will span the entire human visible range, and well into the infrared (and a bit into the ultraviolet). This will more-or-less approximate the emission of a black-body radiator with a certain temperature. The color temperature tells us what temperature black-body this lamp most closely approximates.
Your color-temperature conversion filters will reduce the power in some wavelengths while passing power at others to try to make the output approximate the spectrum of some other temperature of black-body. It won't be able to create power at wavelengths where the lamp didn't produce it, and it won't be able take power in at one wavelength and output it at another. There are devices that can do this, but they don't act equally on wide ranges of wavelengths, so they aren't much use for this kind of application.
If your lamp is a fluorescent bulb or an RGB LED system, things get more complicated, and a temperature conversion filter that is meant for incandescent bulbs might not give good results when used with these source, or vice versa.
That said, temperature conversion filters are likely to be available for common cases like trying to make fluorescent light look more like sunlight. This is (or was before digital photography became the norm) a very common filter available for photographers.