Software-defined networking (SDN) is a cutting-edge technology, featuring a centralized control that facilitates, e.g., flexible deployment of unmanned aerial vehicles (UAVs). On the other hand, UAV-enabled communication is a promising technology due to its numerous traits such as the ability of on-demand deployment and the high likelihood of strong line-of-sight (LoS) communication links. However, UAV-enabled communication suffers non-perpetual nodes and intermittent communication links. Fortunately, SDN provisions an unparalleled global vision on such dynamic network architecture to overcome the challenges of loose links and disappearing nodes. On the other hand, there are catastrophic or remote regions where a UAV-mounted base station (BS) potentially functions without a terrestrial BS, albeit a WiFi access point (AP) may still exist. Therefore, this paper considers software-defined coexisting UAV-mounted BS (UBS) and WiFi AP, and investigates the queuing delay behavior via the UBS positioning and the AP traffic offloading. The subscribers (users) are divided into cellular subscribers (CSs) and WiFi subscribers (WSs). A CS is connected to the UBS and is possibly granted simultaneous access to the AP, leading to WiFi traffic offloading. Leveraging the software-defined global view, the objective of a software-defined controller (SDC) is to minimize the average M/M/1 queuing delay of the CSs, while guaranteeing the delay performance for the WSs, via optimizing the spectrum allocation, the UBS position, the CS association to the AP, and the CS traffic offloading. The optimization problem is non-convex, comprising binary variables, for which we use the block coordinate descent and successive convex approximation methods to find a high-quality solution. Numerical results verify that our solution achieves significant performance gains over benchmark schemes.