This sounds like Special Deliverance by Clifford D. Simak
The cover does have a cube prominent on the cover, on what could be a circle of sand (although on the computer screen it's not entirely clear that's what it is):
An android of some sort is pretty visible on the cover, so that's another point in its favor. The description also seems to match pretty closely to what you remember. I pull these quotes from reviews on the Goodreads page, which are more descriptive than the actual summary:
The story follows an English professor named Edward Lansing, who teaches at an unnamed but tweedy university. He lives alone, and his social circle consists of one male friend he doesn't much like, one female professor he doesn't know what to do with, and an apartment full of unread books and old records. One evening, instead of going home, he wanders into a basement room at the school and finds himself in another world.
In this new world he happens upon a small group of fellow travelers, all with equal confusion about where they are or what they should do next. They are all from Earth, but different Earths, and must work together to understand their purpose in the strange land where they find themselves. For the majority of the book, the characters work at convincing themselves that this new world has been created with some purpose; they find clues and artifacts that make them believe the randomness of their new existence has been somehow constructed and that, if they think and explore long enough, the truth will reveal itself. But always, always, is the lurking fear that this is a place that has been abandoned by sense and reason, and that there is no meaning to be had save desperation and loneliness.
Most of them, as well as the other inhabitants they meet, never find any answers. Instead they succumb to destruction and death, often seemingly voluntarily -- the ambitious leader who throws himself into the unknown, the artist who drowns herself in beauty, the automaton who gives himself to the yawning void.
And the ending you remember is revealed in another review:
Each of the several different stations is endured both as threat and temptation, and members of the party die or vanish at various stages so that only Mary and Lansing succeed at last in meeting the entities behind their pilgrimage. The two are told that have earned the right to be delivered to a world where humans have the best chance to succeed as a species. The conclusion of the novel is particularly interesting for its understated religious and metaphysical suppositions.