If you don't want to bother finding out which was the last entry's ID, here's a one-liner to remove it:
db.collection.findOneAndDelete({}, {sort: {_id: -1}})