How to know if a audio file is real lossless using its spectrogram?
Eventhough there could be opposing theoretical answers to your question, practically speaking it may have a solution which depends on the lossy codec you are using. In that case what you eventually need is a practical knowledge of codec under concern that is used for the audio clip. However, considering the number of different audio codecs and the fact that there could be any number of nonstandard implementations to exist, your problem may not have a guarantied solution. It is because for every different lossy auido codec a different procedure (provided in theory it does exist) might be necessary to test whether a given piece of audio belongs to its output or not. And since for a nonstandard/proprietary/unknown audio codec, you will not have such a procedure at hand you may not even be able to test to see it. 

For example, mp3 (MPEG-I layer 3) standard defines an optional low-pass filter about 16khz, before encoding the raw pcm audio, hence if you find some signal acitivity above 16 khz inside an audio clip, then it is either not an mp3 file or the mp3 profile used to encode that clip, did not activate the lowpass prefilter (as it can be one of the many optional features of the codec) Note that in either case you cannot say that it is a raw file just because it's not an mp3 as it might come from another lossy codec... That is the problem...

Finally, if a lossy codec will include a distinctive feature as a mandatory (nonoptional) requirement of the standard, then you can check for that property to at least decide whether the given piece may belong to its output or not.