Most of us know that Princip's assassination of Archduke Ferdinand was a sizeable factor in starting WWI. Princip was not hung because he was too young. He died of tuberculosis in jail in 1918, so he definitely knew about the war that his actions certainly helped start. How did he feel about the war? Guilty? Indifferent? I'm here to ask that.
As you referred to, Princip was not eligible for execution under Habsburg law, due to his age, and thus recieved the maximum sentence of 20 years imprisonment. He spent the remainder of his days in what were described as bleak and dark confinement chained in a cell in Terezín, in what is today the Czech Republic.
Martin Pappenheim, a psychiatrist in the Austro-Hungarian army, conducted interviews with Princip over a period of months before Princip died, and Pappenheims notes are probably the best primary source to describe Princip's affect and feelings about his actions and the ensuing conflict.
We know from these notes that Princip was aware of the eventual Serbian defeat by combined German, Bulgarian, and Austrian forces in 1915.
From the notes:
"Heard something of war. Heard a tragic thing, that Serbia is no more. His life is hard anyway, Serbia is no more, my people will have a rough time. World War was inevitable, didn’t depend on that. He was an ideal man, wanted to avenge his people. The motives, revenge and love. All his youth in such a revolutionary mood. Talks of anarchist pamphlets that led him to assassination.
Thinks differently today, thinks social revolution is possible in entire Europe, things change. Doesn’t want to talk about it in front of the warden."
Further notes from subsequent interviews:
"He cannot believe the World War was a consequence of the assassination; cannot feel himself responsible for the catastrophe."
One might surmise from this that Princip had feelings of some sort about the backlash against Serbia itself but that he either didn't fully grasp or otherwise didn't feel culpable for the chain of events resulting in WWI.
The notes further indicate Princip tried to hang himself in prison:
"Admits attempt at suicide a month ago. Wanted to hang himself with the towel. It would be stupid to have a hope. Has a wound on the breast and on the arm… A life like mine, that’s impossible. At that time, about 12 o’clock, he could not eat, was in bad spirits, and on a sudden came the idea to hang himself. "