To beat the game, you must pacify the three main wings of the prison.
The Boss Fights: Each wing has a mini-boss and a main boss. Do not fight them immediately. Grind the random encounters in that wing until you have the appropriate Title (Level). Bosses in this game are immune to many status effects and hit incredibly hard. Save before every boss door.
The beginning of the game is the hardest part. You lack skills, equipment, and money.
Once you finish the game, you unlock New Game+.