"So ist es nun mal" has the meaning "That's the way it is"
"Nun ja" can mean that the speaker is uncertain about what to answer to a question. For example: "My car has a scratch! How could this happen?" "Nun ja, da war dieser LKW ..." and in English "Well, there was this truck ..."
Best Regards
Lorenz