Your question indicates that you are comparing Shakespeare's Sonnet XXVII to John Milton's Sonnet VXI and you link to John Milton's Sonnet XVI, which starts, "Cromwell, our chief of men..." But, perhaps you actually mean to be comparing Shakespeare's Sonnet XXVII to Milton's Sonnet XIX, starting, "When I consider how my light is spent." The reason why I suspect you actually may be trying to compare XXVII to XIX is because they share the common themes of working in the world and exhaustion, whereas the other two don't have a whole lot in common. However, some of the below points are applicable to either pair of sonnets.
One major difference between Shakespeare's Sonnet XXVII and John Milton's Sonnet XIX in terms of structure and type concerns the fact that Milton used what we call the Petrarchan sonnet form, named after medieval Italian poet Francesco Petrarca, the most famous of those poets who have used this structure. The Petrarchan sonnet consists of an octave (eight lines) and a sestet (six lines). It also has a very specific rhyme scheme: abba, abba, cdecde or cdcdcd ("Poetic Form: Sonnet"). In Milton's sonnet, the octave includes everything from the first line ending in "spent" up to the line ending in "prevent." The sestet includes all other lines in the poem. Looking at the final word in each line to determine the rhyme scheme, we see that the rhyme scheme is abba (spent, wide, hide, bent); abba (present, chide, denied, prevent); cde (need, best, state); cde (speed, rest, wait), which matches the rhyme scheme of a Petrarchan sonnet perfectly. If you need to know, the same structure and rhyme scheme also applies to Milton's Sonnet XVI; the one exception is that the rhyme scheme of the sestet is cdd (remains, victories, arise), cee (chains, paw, maw), which is a bit different from typical sestets in Petrarchan sonnets, though the scheme is a legitimate variation.
In contrast, Shakespeare invented his own sonnet structure. His sonnets consist of three quatrains (three stanzas of four lines) and then a final couplet (two lines). His sonnets also follow their own rhyme scheme, which is abab, cdcd, efef, gg ("Poetic Form: Sonnet"). Shakespeare's Sonnet XXVII certainly follows his own typical structure and rhyme scheme. For the first quatrain, we have the rhyme scheme abab (bed, tired, head, expired); for the second quatrain, we have cdcd (abide, thee, wide, see); for the third, we have efef (sight, view, night, new); and then finally we have gg (mind, find).
In both sonnets, the speakers express weariness, especially weariness at life and its endless toils. One major difference is that Shakespeare's ends with a tone of agonizing frustration as the speaker reflects that mankind is really working both day and night, whereas Milton's ends with the uplifting revelation that God does not need man's labors, and instead, mankind serves God best when they "stand and wait."