There is a long history of college teams playing against MLB teams in spring exhibition games. This WSJ article has a good description of it:
Such was the unusual spectacle of the Phillies’ 6-2 loss to the University of Tampa, a Division II school. It was a sight only possible in Major League Baseball, the lone major U.S. sport with a long-standing tradition of pro teams inviting college teams to play them in preseason exhibitions.
Typically, the college team arrives in the morning, tours the facilities, watches the pros go about their routines—and then gets pummeled. In 67 such games between 2006 and 2014, MLB teams went 63-3-1, combining to outscore the collegians 642-133.
Exhibitions between major-league and college teams date to the 19th century. In 1876, the team then called the Boston Red Stockings, which eventually became the Atlanta Braves, beat Harvard just days before playing the first game in National League history. For all that has changed since then, the purpose of the games for major-league teams has remained largely the same.
They usually play them just before the start of official spring-training games, after a week or two of workouts. By then, players are tired of practice drills, and executives are eager to see players in game situations. “It’s a little bit of a warm-up for everybody,” Phillies general manager Ruben Amaro Jr. said.
In 1992, a team of college stars was formed to help the U.S. men's basketball team (the "Dream Team", with 11 NBA players) prepare for the Summer Olympics. The team had the following players: Chris Webber (Michigan), Grant Hill (Duke), Bobby Hurley (Duke), Anfernee Hardaway (Memphis State), Allan Houston (Tennessee), Jamal Mashburn (Kentucky), Eric Montross (North Carolina), and Rodney Rogers (Wake Forest).
The college players defeated the Dream Team in their first 20-minute scrimmage by a score of 62-54. This happened because the NBA players didn't take the college players seriously and hadn't developed any chemistry yet. In addition, Coach Chuck Daly intentionally used poor strategies and didn't try to win the game because he wanted to deflate the NBA players' egos and show them that they could be beaten.
Here are some interesting quotes regarding that first scrimmage:
Charles Barkley: The first time we saw them, they looked like babies. We were like, "Hey, man, let's don't kill these little kids." And they were playing like it was Game 7. Before we knew it, they upset us.
Karl Malone: We took them for granted, and they kicked our butt.
Michael Jordan: We're so out of sync and so unsure about things that we feel comfortable with in normal situations. We don't have any continuity at all.
Scottie Pippen: These young kids were killing us. We didn’t know how to play with each other.
Bobby Hurley: I think they were searching. They weren’t in sync or accustomed to playing as much, which happens when you’re putting a team together and trying different combinations of players. [...] When you’re playing a lot of guys, players who are used to playing a lot have trouble getting into a rhythm.
Assistant Coach Mike Krzyzewski: Chuck [Daly] wanted them to lose. [...] He threw the game. [...] If you look at how much Jordan played and how he subbed the guys in, not picking up, not making any adjustments; he knew what he was doing.
The next day the teams had another scrimmage, and the Dream Team destroyed the college players. Here are some interesting quotes regarding that second scrimmage:
Chris Webber: We didn't score a point. Not one point. Not a point on a free throw, not a point in the game.
Grant Hill: The next day, we couldn't get the ball over half-court.
Bobby Hurley: The court shrank. There weren’t opportunities to run, and in the half court we had no offense. [...] They were so long and quick, you couldn’t go by them or create anything. They beat us by 30 points in that next scrimmage, and it could have been more than that. We had 3-4 scrimmages the rest of the week, and all of them had similar outcomes.
Sources: GQ, CBS Sports, Lost Lettermen, NY Times, LA Times
From 2000 to 2003, the Harlem Globetrotters played 22 games against college teams. The college teams lost 13 of those games (see the full list of results). In 2004, the NCAA banned teams from playing against the Globetrotters. In 2006, the Globetrotters lost a game to the NABC College All-Stars. The Globetrotters Wikipedia article mentions some of these games:
Five years later, following another 1,270 wins, they lost 72 to 68 to Michigan State University, the reigning men's collegiate champions, on November 13, 2000.
Two years later, they "set aside the hallmarks" for a "three-week, no-nonsense tour against college teams" from men's Division One. [...] On November 10 and 11 at Vanderbilt University and the University of Maryland, another defending champion, they lost close games to both teams, their first consecutive defeats since 1961. [...] On November 3, 2003, the Globetrotters had a streak of 288 consecutive victories snapped after suffering an 89–88 loss to the UTEP Miners, who had just six victories the season before. It was their only loss during an eight-game college tour wherein the Globetrotters had defeated Michigan State (97–83), UMass (77–68), and defending national champion Syracuse (83–70).
Their most recent loss came on March 31, 2006, when they went down 87–83 to the NABC College All-Stars.
From 1934 through 1976, a preseason match called the Chicago Charities College All-Star Game was always played between the previous season's NFL champion and a team of the previous season's star college seniors. Forty-two of these games were played, and the college all-star teams won 9 of them, lost 31 of them, and tied 2 of them.