All paths come with risk. Regardless of whichever direction you choose to go. Stay with the job you hate but know or change. Perhaps you will find something better. Perhaps something worse. The perspective we have can change too. Understanding that experience is neither good nor bad, risky or safe; but actually something we can choose to learn from or not.
You only know better once you learn better.