I'm pretty sure this is a duplicate of:
Story about a girl who goes into a black hole (and lives)
If so, then I'm also pretty sure this is Tanglewreck by Jeanette Winterson. It was published in 2006, which fits in with your having read it "at least ten years ago".
One thing that both of your questions have in common is that you mention a girl being pulled into this black hole. While the main character is female, the character actually imprisoned in the black hole is a male secondary protagonist called Gabriel.
I've posted an answer to the other question, along with quotes from Google Books that support it being the correct book. In particular, this extract matches what you say above, and you can see a lot more of it by going to that Google Books page and searching on terms like "spaghetti", "shed" and "black hole".
The guards had bundled him out of the van and pushed him towards a corrugated iron shed.
Did they throw you down here like the rest?
Gabriel told them about the shed, but the Voices knew nothing of that.
"You feel what I be, now I feel what you be," he said, plunging forward and touching the nearest shape.
The shape was long and thin, but not flat. The shape was round and pulpy, like warm spaghetti, like a fat worm, and its longness and thinness never seemed to end. Gabriel was coiling the body like a rope over his arm.
"Where be thine end?" he said, his boldness gone.
"... so much gravity down here that it pulls everything in with it, even light. Even light can't escape this place. No Time, no light, just what they call the Stretch"
"The Stretch?" Gabriel was nervous. "Gravity down here will stretch you like spaghetti"
(If you're British, you'll know that "a stretch" or "a long stretch" is a slang term meaning "time spent in jail.")
On a later page:
That be its name? Black Hole?