Oh my, he's a real cutie, looks like a silky cross from the photo.
The main thing is to have patience, sounds like you have that in buckets. Allow him to settle in, go about your routine as normal, and try not to fuss over him too much (as hard as that may be), let him observe and get a "feel" for you and the home. Sounds like he feels safe under the desk (would be like a little cave for him), so let him sleep there if it doesn't inconvenience you too much. At night, can you confine him to the laundry or bathroom? I find the smaller the area the less likely they are to wee and poo everywhere. Crate training is also a great option. If you can take him out in the middle of the night to begin with it will help.During the day take him out every hour or two, gradually extending the period, he may start heading outside by himself once he gets the idea. Don't worry that he's not a puppy, any dog can be house-trained no matter what age.
Get him desexed, it may not stop the marking, but the smell won't be so bad, and (in my personal opinion) it's the resposible thing to do. AND microchipped!
The vet should be able to give you a ball park age ie 1-3, 6-8etc, based on the condition of the dog's teeth and eyes (however there is room for error as some little dogs' teeth are shocking even at a young age).
He'll come out of his shell a lot over the next week or so, I look forward to reading about his progress.