In Portal 2, Chell awakens and hears that 9999... years have passed. The surface is just a wide field. Is she the last person on earth?
Is she the last person alive...
No. There are plenty of additional test-subjects that are uncovered at the end of the co-op campaign
on [the surface of the] earth?
Nobody really knows. Killing everyone on the planet is quite difficult, and the ending of the Half-Life series (as the two exist in the same universe, but vastly separated in time when Portal 2 occurs) would probably provide the best answer. I would assume that the Good Guys win, so people will still be around, but who knows how many or where they're at?