Is it possible to return a custom string or variable from a line trace ?

You can cast the result of the Other Object from the linetrace to whatever you want.

If the cast succeeds, you can call any function or property on that class.

e.g Create a new BP class MyHero.
Add Name property.
Give property value.
Shoot it with LineTrace.
Cast to MyHero
Read Property.