The main difference is in connotation. Mere is used to prescribe little importance to something. Just can be used in a synonymous manner. For example "I'm merely human" and "I'm just human". This usage of belittles humanity in both cases. I think any differences would be that just might be seen more positively because of its other definitions, like being adequate, or being righteous, while mere is always negative, used to make a person or thing seem small and unimportant.