On the trace embedding and its applications to evolution equations