How does literals in compiled languages differ from literals in interpreted languages?
A literal is a piece of data which gets its value at compile time.


I don't think that's a good definition of literals. A literal is a source-code token that represents a fixed value of some type. For example, in almost all programming languages, 23 is a literal representing the integer twenty-three. These aren't pieces of data that get their value at compile-time: rather, they are representations of the values themselves.  For example if, in Java, you write

static final int magic = 23;


then magic is a constant (a variable whose value cannot be changed) that is set at compile-time to have the value twenty-three, which is the meaning of the literal 23.

This is no different between compiled and interpreted languages.