Try to look up the definition of temperature and you will see that it is not as simple as you think. One possible definition defines temperature as the partial derivative of the internal energy with respect to the entropy. Why wouldn't that be applicable to an ideal vacuum or a radiation-filled vacuum? Maybe it is not, I am neither a physicist nor particularly knowledgeable in thermodynamics and statistical mechanics, but it is - at least to me - not obvious that it is not applicable. There are also generalized definitions of temperature applicable to system of few particles, i.e. not relying on the statistics of many-particle systems, which sounds like it should be applicable to any real vacuum as any real vacuum will never be perfectly empty.