As pointed out in the question,

>!the cake is shown at the end of the game.

During the final battle with GLaDOS,

>! a recipe for cake is given by one of the personality cores you destroy. According to the [Portal Unofficial Wiki][1], the recipe contains "inedible or undesirable ingredients".

Finally according to the answer to [this Arqade question][2]:

>! When GLaDOS is defeated, she says the line "There really was a cake".

All this implies that the cake does actually exist. However it remains unclear whether GLaDOS ever really intended to reward Chell with cake for completing the trials.

  [1]: http://theportalwiki.com/wiki/Cake
  [2]: http://gaming.stackexchange.com/questions/38665/does-glados-actually-say-there-really-was-a-cake