Theoretically you could sign a contract like that, but the real problem is that players have too much bargaining power. They wouldn't agree.
But is Quagliarella or Iaquinta going to reject a move to Juve from a lesser team in Serie A because they are offered a slightly shorter contract?
So long as no-one else was trying to sign them (I do think anyone else was with those two), I very much doubt they'd turn down the move to Juve.
Buy on AliExpress.com