The negative sentence 九時半まで寝ませんでした can mean both "I hadn't go to bed before 9:30 and fell asleep at 9:30." and "I had fallen asleep and woke up before 9:30", thus, it exactly means "I didn't sleep until 9:30" including its ambiguity.
The negative sentence 九時半まで寝ませんでした can mean both "I hadn't go to bed before 9:30 and fell asleep at 9:30." and "I had fallen asleep and woke up before 9:30", thus, it exactly means "I didn't sleep until 9:30" including its ambiguity.
I don't quite understand how the two meanings (particularly, "I had fallen asleep and woke up before 9:30") make 九時半まで 寝ませんでした exactly mean "I didn't sleep until 9:30".
But looking at the answers, this is what I understood:
I slept until 9:30 = 九時半まで 寝ました
I didn't sleep until 9:30 = 九時半まで 寝ませんでした