There are broken lightbulb removal tools but the ones I found are pretty much for regular ceiling lightbulbs and probably wouldn't work on a small sewing machine bulb. There's a tool shown here but I don't know where you would find it.
Perhaps this would be helpful:
Pfixing the Pfaff
(further down the page, it shows how to remove the side cover--after removing the top cover first!)
Be sure to unplug your machine first!!!
You might try using a very long needlenose plier. Stick the needlenose up inside the bulb, then open the pliers until the outside of the nose is tight against the bulb socket and try twisting. If it doesn't grip enough, you might try putting something like a rubber finger over the nose tip. (If there is no broken glass left, you may even be able to put a rubber finger on a fat pencil or even your finger up there and twist.)
Something else that may work is using a fat school eraser, trimming it down to fit in the broken socket.
E326 6 XLT Long Nose Plier with Cutter
Amazon com Swingline Rubber Finger Tips Size 11 1 2 Medium 12 Box 54035...
school eraser Google Search
I would even consider putting super glue on a fat pencil eraser end, sticking it up there and letting it adhere, then giving it a twist.