While I can't claim knowledge of field artillery during the medieval period, I can discuss it during the classical era, specifically the Roman late Republic and early Empire period. During this period, Roman Legions had an organic artillery section that was integral to each legion, responsible for building and maintaining ballistae and scorpions.
Scorpions were smaller, bolt-throwing engines capable of relatively rapid fire, whereas ballistae ranged in size but were capable of throwing heavier stones. Both weapons looked somewhat like large crossbows mounted on a wooden frame; scorpions in particular were mounted on a wooden tripod and were man-portable. These machines were used in the field and could be manhandled about the battlefield.
Our earliest written knowledge of these artillery pieces comes from Vitruvius's De Architectura, in which he describes the construction of both scorpions and ballista. De Architectura was written during the reign of Augustus, approximately during the period of 30-15 B.C.E. The larger onager, which appears more like a traditional catapult, is not described by Vitrivius. It did not achieve widespread use until several centuries later, and then only as a fixed weapon for use against structures.
Vitruvius describes scorpions as throwing arrow-like bolts, crewed by between two and four men "for defense against danger, and in the interest of self-preservation."^1 These weapons would have appeared something like this^2 and would have been very effective antipersonnel weapons, capable of penetrating several ranks with a single shot.
Stone-throwing ballistae could be (and were) used in antipersonnel functions, and smaller ones (such as Vitrivius's two-pound stone-thrower) would have been effective (similar to, say, a cannon firing a two-pound solid shot in a higher trajectory), but the scorpions would have been more accurate, using a flatter trajectory. Later, larger onagers were primarily used during siege operations, their size "not being suitable for use in the field."^3
Field artillery were also used from fixed positions, both offensively and defensively, during sieges as an antipersonnel weapon as well as for the destruction of walls, buildings, etc. D.B. Campbell discusses these "ballistaria" (fixed platforms which mounted both scorpions and ballistae on walls) in Britain in the first three centuries C.E., and Gwyn Davies notes the existence of similar use during the Roman siege of Masada circa 72-74 C.E.
Scorpions, in particular, would not have been particularly effective against stone walls, though larger-bolt throwers did exist. In a defensive situation, these weapons would have been highly effective both in killing attackers, and also at destroying the artillery of the besiegers - mounting weapons on a higher platform would have been particularly effective during sieges, but the weapons "had no recoil"^4 and could be used in the field with the simple tripod bases described by Vitruvius. Cassius Dio also records the use of siege weapons defensively as antipersonnel weapons, such as at the siege of Byzantium:
[T]here were engines in the greatest variety along the entire length of the wall. Some, for example, hurled rocks and wooden beams upon any who drew near, and others discharged stones and other missiles and spears against such as stood at a distance, with the result that over a considerable area none could come near them without danger.^5
The Romans were not the only ones to use field artillery in an antipersonnel role, however. Cassius Dio records the use of field artillery by the Hatreni (of Hatra, in present-day Iraq), which "fired at very long range, even striking many of the imperial bodyguard."^6 However, the Roman legions were the primary users of field artillery during this time.
So, to sum it up, there is historical basis for the use of field artillery in the Total War series, particularly those games which pertained to the Roman period. I can't speak for the games covering other eras as I'm not overly familiar with artillery in the medieval era, or at all with that during the shogunate.
The games do not succeed in total accuracy (for example, ballistae in Rome: Total War threw arrow-like bolts, not the stones they threw historically, and onagers were mobile and useable as field artillery, again ahistorically). However, there is definite historical basis for the use of field artillery during the Roman Republic and Roman Empire.
Notes:
Vitruvius, De Architectura. Book X, Chap. X-XII. Trans. Morris Hickey Morgan. Harvard University Press. Cambridge: 1914.
Image from Baatz, Dietwulf. "Recent Finds of Ancient Artillery." Britannia 9 (1978): 1-17. doi:10.2307/525936. Reconstruction by Schramm. Page 3.
Campbell, D. B. "'Ballistaria' in First to Mid-Third Century Britain: A Reappraisal." Britannia 15 (1984): 75-84. doi:10.2307/526584. Page 79.
Campbell, D.B. "'Ballistaria.'" Page 79.
Cassius Dio. Historiae Romanae, Book 75, Chapter 11.
Baatz, Dietwulf. "Recent Finds of Ancient Artillery." Page 9.
Sources:
Baatz, Dietwulf. "Recent Finds of Ancient Artillery." Britannia 9 (1978): 1-17. doi:10.2307/525936.
Campbell, D. B. "'Ballistaria' in First to Mid-Third Century Britain: A Reappraisal." Britannia 15 (1984): 75-84. doi:10.2307/526584.
Cassius Dio. Historiae Romanae, Vol. IX, Book 75. Loeb Classical Library, 1927.
Davies, Gwyn. "Under Siege: The Roman Field Works at Masada." Bulletin of the American Schools of Oriental Research, no. 362 (2011): 65-83. doi:10.5615/bullamerschoorie.362.0065.
Hamblin, William J. "The Roman Army in the First Century." Brigham Young University Studies 36, no. 3 (1996): 337-49. http://www.jstor.org.ezproxy1.library.arizona.edu/stable/43044137.
Vitruvius, De Architectura. Book X, Chap. X-XII. Trans. Morris Hickey Morgan. Harvard University Press. Cambridge: 1914.