Answer:
I believe that, in these specific lines, the literary device is indeed a simile.
Explanation:
It is known that in his poem "To a Skylark", Shelly employed several types of literary devices, among which we have allusions, an apostrophe, and a couple of metaphors as well. But since we should focus on the lines offered in the question, the literary device that is evident from the get-go is the simile.
A simile is a figure of speech used with the intention of making a comparison - stating a similarity - between two different things. It uses words such as "as" or "like". In that sense, it differs from the metaphor. The simile makes a direct comparison while the metaphor makes an indirect one.
The very first line, "Like a poet hidden", compares the skylark to a poet by the means a simile. The other lines simply prolong such comparison by attributing actions and characteristics of a poet to the bird.