It's a well-known quote from the Bible - in case you weren't aware - and it is different in the sense that "what goes around, comes around" is usually used after someone does something negative, whereas "judge not..." is said as a warning against judging per se and not just a general statement to not do wrong to others. So my question is basically : does تدين here carry the meaning 'to be judgmental' or is it just a metaphor for doing wrong to others in general?It carries the first meaning. I don't see how it can mean your second suggestion.
No it's not. Maybe what is confusing you is that إدانة does mean 'conviction of a criminal'. But broadly speaking, تدين means 'to fall into debt or to lend something or to take something or to live a certain way' and تدان means the same thing happening to you. دان يدين can never mean 'to judge someone'. And كما تدين تدان is not from the Bible as far as I'm aware (though your quote is, of course).Why not? Isn't the word-for-word translation : as you condemn, you are condemned?