While pasta cooks, make the sauce. Heat oil in a medium skillet over medium-high. Add onions, cook, stirring occasionally, until tender, about 5 minutes. Add garlic and black pepper. Cook an additional minute. Reduce heat to low. Add half and half, ham, and peas. Bring to a simmer and cook, stirring occasionally, until sauce thickens slightly, about 5 minutes.