The reason it says “undefined” is because the variable is not declared and initiated properly. The reason for this is that when you use .deployed(), this returns a Promise and the command you are running ca not use Promise object. Instead, try the following command:
truffle(development)> ProofOfExistence1.deployed().then(function(a) { poe = a; })