The phrase "not of an age, but for all time" was not written by William Shakespeare but was, in fact, the words of Ben Johnson. They appeared in Johnson's introduction to the First Folio, the first collected edition of Shakespeare's play which were published in 1623.
Johnson, a fellow writer, was a great admirer of Shakespeare and this phrase is high praise, indeed. We can see this by breaking down the phrase into two sentences. On one level, "not of an age" refers to Shakespeare's ability to write convincingly about a wide range of time periods, from Ancient Rome to the Middle Ages. But on another, it demonstrates Johnson's belief that Shakespeare was more than a writer of his era. His work went far beyond that of other Elizabethan playwrights and shows how innovative Shakespeare really was.
Finally, the phrase "for all time" refers to Shakespeare's timeless quality. Johnson knew that his plays would never feel dated to readers and that they would continue to be enjoyed for centuries to come.