The implication is that Baker is in such straitened circumstances that he has sold or pawned his shirt, and is trying to disguise the fact by keeping his coat buttoned and his collar turned up, even when indoors. The original publication of the story in the Strand Magazine, 1892, had an illustration by Sidney Paget, contrasting Holmes, whose unbuttoned frock coat reveals a waistcoat, shirt and tie; with Baker, whose coat is uncomfortably buttoned up to the neck.

Pawning one’s shirt to pay for drink was a byword for ruinous alcoholism, for example in this mock-antiquarian ballad:
He pawned his shirt and his breeches both
Where the fire shines bright on yon Ale-house-wall;
He then did swear a terrible oath,
For ire that liquor was lord of all.
Anon (1814), attributed to John Roby. The Lay of the Poor Fiddler, p. 115. London: B. & R. Crosby.
or in this newspaper report of an inquest on a suicide:
An inquest was held at the Black Horse, Vine-street, Chandos-street, Covent-garden, on the body of William Gable, aged 32 years, who was found suspended in a common brothel, No. 4, Vine-street. From the evidence, it appeared that the deceased was a watch-finisher, residing in Old-street-road; latterly his conduct was altered, and his spirits had been much depressed, in consequence of his ill-success in business, which rendered him incapable of supporting his family in the manner he wished; he, therefore, resolved to leave his home and family of eight children; and, on Wednesday night, sent his wife on an errand, when he dressed himself in a somewhat respectable manner, and taking a watch, which belonged to one of his customers, went away. His first step, it appeared, was to pledge the watch in the neighbourhood of Smithfield, for 2l.;† he then went through the neighbourhood of Chandos-street where he was accosted by several women of the town. He accompanied one of them to the house in which he was found dead. Gin and beer were supplied till Friday evening, when, after having pawned his shirt and his hat, he found himself without a penny.
Chronicle for February 1824, p. 24. In The Annual Register, 1824. London: Baldwin, Craddock and Joy.
† 2l. = £2, equivalent to about £200 today.