You are right and whoever wrote this quote "Alkaline metals and their salts impart characteristic colour to an oxidising flame. This is because the heat from the flame excites the outermost orbital electron to higher energy level. When excited electron comes back to the ground state, there is emission of radiation in the visible region of the spectrum. Beryllium and magnesium do not impart colour to flame because electrons in beryllium and magnesium metal are too strongly bound to get excited by flame." is mostly wrong about Mg and Be.
The first process in flame spectroscopy is to decompose the compounds in the flame into atoms. /This requires a lot of energy. In ordinary lab flames, like that of the Bunsen burner (methane+air) the temperature is so low that alkaline earth (Ca, Ba, Sr) emit light because of their compounds in the flame not by their atoms. Recall magnesium and beryllium forms refractory oxides, so the correct explanation is that the flame temperature of ordinary oxidizing Bunsen burner is so low that it is not able to break magnesium compounds and excite beryllium in the flame.
Now if you use a proper flame, say that of acetylene-air for Mg or better acetylene-nitrous oxide flame for Be, you should see emission mostly in the UV but also very low intensity visible lines. The visible lines could be detected by a sensitive detector rather than the eyes. Nitrous oxide flame is highly colored itself (sunset pink color) and one cannot see visible emission easily without using a monochromator.