Matt Cutts discussed this topic recently in a Google Webmaster Help video posted on YouTube.... Can I buy a domain that used to have spam on it and still rank? Matt Cutts - trt 3:32 Apr 10, 2013 http://www.youtube.com/watch?v=lGUw9oS5csI
In answer to your question as you formulated it...
Would a domain name have any penalty or ban removed after it has expired?
...I think Matt's answer would be that the penalty is not removed just because of expiration. It would instead depend on the type of penalty. It would most likely also require clean-up, and some penalties are not easy to remove.
In the video, Matt makes the distinction between two types of spam that a domain might have, algorithmic spam and manual spam, and he gives what seems to me like best-case/worst-case examples of the two with regard to this question.
As Matt explains the distinction in the video, "all manual spam does have an eventual time out. So, if you were to completely clean up all the content on the domain -- do a reconsideration request -- in theory that domain can recover."
Algorithmic penalties, though, don't get removed until the algorithmic problems are cleaned up, "and if there are a ton of spammy links that the previous owner built up, that can be a little bit hard to go through and try to clean up, and get all those links taken down, and make a list of all those links."
If the domain had been owned by a churn and burn spammer who used every conceivable trick to milk the domain for rankings, and then tries to make some extra money by selling it, a buyer might be left holding the bag.
Essentially, buying a penalized domain would put you in a hole, requiring that you build your way out, but the exact answer depends on the particular history of the domain and the type of penalties it has. I recommend watching the video a few times. Matt fuzzes the answer enough to keep the "secret sauce" secret, but I think he provides pretty good guidelines regarding cautions you need to take.