In Cormac McCarthy's The Road, the squid is mentioned twice:
The soft black talc blew through the streets like squid ink uncoiling along a sea floor and the cold crept down and the dark came early and the scavengers passing down the steep canyons with their torches trod silky holes in the drifted ash that closed behind them silently as eyes.
Too black to see. Taste of salt on his lips. Waiting. Waiting. Then the slow boom falling downshore. The seething hiss of it washing over the beach and drawing away again. He thought there could be deathships out there yet, drifting with their lolling rags of sail. Or life in the deep. Great squid propelling themselves over the floor of the sea in the cold darkness. Shuttling past like trains, eyes the size of saucers. And perhaps beyond those shrouded swells another man did walk with another child on the dead gray sands. Slept but a sea apart on another beach among the bitter ashes of the world or stood in their rags lost to the same indifferent sun.
In both instances eyes are mentioned. Eyes symbolize spiritual knowledge and morality, or the lack thereof (blindness). Obviously, when a squid unleashes its black ink, its prey go blind while it retreats into hiding. It is ironic to note that squids have human-like eyes.
So, the analogy is that the cloud of ash (the apacolypse) has shrouded the earth, all men, in blindness and immorality. There is no moral compass anymore. Not even the sea is a source of life. Remember, the sea is a red herring, a giant landmark only. It is just a void; it has lost all mythical, symbolic significance. The man travels toward the sea for half the novel, only to be disappointed when he gets there.
Have you see the movie The Squid and the Whale (2005)? It's named after the famous exhibit in the Museum of Natural History (NY) in which a giant squid attacks the head of a giant sperm whale. Freudian connotations abound. In the movie, the squid and the whale are symbols of the parents fighting. So, it could be a symbol of the mother (who suicided) and the Mother Earth (who is almost black).
In this case, the squid is a symbol of the "Id," as it the part of the subconscious buried deep beneath the "Ego" and "Superego." To expound further, I think the cannibals and the threat of suicide in the novel are the ids (the two great fears); the man is the superego (most of the time); and the boy is the ego (most of the time), as he is caught in the middle. At the end, the boy's decision to show kindness to the man on the road (after his father wanted to kill and strip him) shows that he is the "Superego," and not his father.
This answer would be considered to be more of an opinion. Cormac McCarthy has presented readers with a novel that presents a world that is desolate dark and brooding. There seems to be nothing bright or positive in post apocalyptic earth. The world has emptiness to it much like the deep depths of the ocean. The ocean has an endless range of sand that goes on and on. When a squid discharges his ink nothing can be seen through it until it begins to dissipate in the water.
McCarthy used the metaphor of the sea to show the desolation and emptiness of the current world and the world under the sea. It is even more related when he and the boy later go to the ocean and find it to be blackened and gray as well. It too has been charred and spoiled.