How to explicitly connect hidden pins in eagle?
I added the same object in eagle now too and it works fine here. 

Maybe the 'random' pins are also connected ground for example. If the shift register is closer to a component that is also connected to ground you will see a yellow line (from the unrouted layer) to that component. 

To check if this is the case you can use the show function on the board layout screen. (you can use this function by typing show in the text bar) Then click on the yellow unrouted line. everything that is sharing the same net name (GND in our example, will light up. You can now easily check if the arduino ground pins are lighting up. Also the name of the net is showed in the bottom left corner of the screen once you used the show function.